RFR: JDK-8241503: C2: Share MacroAssembler between mach nodes during code emission
Dean Long
dlong at openjdk.org
Fri Nov 3 01:47:02 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`.
src/hotspot/cpu/x86/gc/z/z_x86_64.ad line 37:
> 35: #include "gc/z/zBarrierSetAssembler.hpp"
> 36:
> 37: static void z_color(MacroAssembler* masm, const MachNode* node, Register ref) {
For files already using MacroAssembler& _masm, the only change needed is this at the top:
undef __
#define __ _masm.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16484#discussion_r1381015121
More information about the shenandoah-dev
mailing list