RFR: JDK-8287349: Merge LDR instructions to improve C1 OSR performance

Andrew Haley aph at openjdk.java.net
Sat May 28 06:44:34 UTC 2022


On Sat, 28 May 2022 06:28:57 GMT, Zhuojun Miao <zmiao at openjdk.org> wrote:

> Since MacroAssembler added merge_ldst, we can use different
> destination registers for contiguous-memory LDR instructions to improve performance.

src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp line 288:

> 286:       __ ldr(r20, Address(OSR_buf, slot_offset + 1*BytesPerWord));
> 287:       __ str(r19, frame_map()->address_for_monitor_lock(i));
> 288:       __ str(r20, frame_map()->address_for_monitor_object(i));

I think it would be better to use `ldp` explicitly here, rather than relying on the assembler to do the merge.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8933


More information about the hotspot-compiler-dev mailing list