RFR: JDK-8241503: C2: Share MacroAssembler between mach nodes during code emission
Fei Yang
fyang at openjdk.org
Fri Nov 3 04:49:01 UTC 2023
On Thu, 2 Nov 2023 22:17:43 GMT, Cesar Soares Lucas <cslucas at openjdk.org> wrote:
> # Description
>
> Please review this PR with a patch to re-use the same C2_MacroAssembler object to emit all instructions in the same compilation unit.
>
> Overall, the change is pretty simple. However, due to the renaming of the variable to access C2_MacroAssembler, from `_masm.` to `masm->`, and also some method prototype changes, the patch became quite large.
>
> # Help Needed for Testing
>
> I don't have access to all platforms necessary to test this. I hope some other folks can help with testing on `S390`, `RISC-V` and `PPC`.
Hello, I guess you might want to merge latest jdk master and add more changes.
I witnessed some build errors when building the latest jdk master with this patch on linux-riscv64:
/home/fyang/jdk/src/hotspot/cpu/riscv/riscv.ad: In member function 'virtual void UdivINode::emit(C2_MacroAssembler*, PhaseRegAlloc*) const':
/home/fyang/jdk/src/hotspot/cpu/riscv/riscv.ad:2412:30: error: 'cbuf' was not declared in this scope
2412 | C2_MacroAssembler _masm(&cbuf);
| ^~~~
/home/fyang/jdk/src/hotspot/cpu/riscv/riscv.ad: In member function 'virtual void UdivLNode::emit(C2_MacroAssembler*, PhaseRegAlloc*) const':
/home/fyang/jdk/src/hotspot/cpu/riscv/riscv.ad:2427:30: error: 'cbuf' was not declared in this scope
2427 | C2_MacroAssembler _masm(&cbuf);
| ^~~~
/home/fyang/jdk/src/hotspot/cpu/riscv/riscv.ad: In member function 'virtual void UmodINode::emit(C2_MacroAssembler*, PhaseRegAlloc*) const':
/home/fyang/jdk/src/hotspot/cpu/riscv/riscv.ad:2442:30: error: 'cbuf' was not declared in this scope
2442 | C2_MacroAssembler _masm(&cbuf);
| ^~~~
/home/fyang/jdk/src/hotspot/cpu/riscv/riscv.ad: In member function 'virtual void UmodLNode::emit(C2_MacroAssembler*, PhaseRegAlloc*) const':
/home/fyang/jdk/src/hotspot/cpu/riscv/riscv.ad:2457:30: error: 'cbuf' was not declared in this scope
2457 | C2_MacroAssembler _masm(&cbuf);
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16484#issuecomment-1791888196
More information about the shenandoah-dev
mailing list