RFR: AARCH64: 8138575: Improve generated code for profile counters (original) (raw)

Andrew Haley aph at redhat.com
Tue Sep 29 17:17:10 UTC 2015


AArch64 generates suboptimal code for profile counters.

This

add xscratch2, x0, #0x218
ldr xscratch1, [xscratch2]
add xscratch1, xscratch1, #0x1
str xscratch1, [xscratch2]

can be this:

ldr xscratch1, [x0, #0x218]
add xscratch1, xscratch1, #0x1
str xscratch1, [x0, #0x218]

Although this looks like a very minor improvement, the same pattern is repeated many times in C1-generated code.

http://cr.openjdk.java.net/~aph/8138575/

Thanks, Andrew.



More information about the hotspot-dev mailing list