Right now, every mach node uses a brand new MacroAssembler instance.
Refactor the code, so a single MacroAssembler instance is shared across the whole code emission phase.
The motivation is to reduce memory consumption and speed up C2. `C2_MacroAssembler` is based on `ResourceObj` which allocates in compiler arena. Each small `C2_MacroAssembler masm()` will add allocation to arena until we finish compilation. Also speedup because we don't need to do such allocations.
Refactor the code, so a single MacroAssembler instance is shared across the whole code emission phase.
The motivation is to reduce memory consumption and speed up C2. `C2_MacroAssembler` is based on `ResourceObj` which allocates in compiler arena. Each small `C2_MacroAssembler masm()` will add allocation to arena until we finish compilation. Also speedup because we don't need to do such allocations.
- relates to
-
JDK-8239472 Optimize JCC erratum further
- Open
-
JDK-8333276 RISC-V: client VM build failure after JDK-8241503
- Resolved