[aarch64-port-dev ] RFR(M): 8233743: AArch64: Make r27 conditionally allocatable

Pengfei Li Pengfei.Li at arm.com
Mon Dec 23 07:53:52 UTC 2019


Hi Andrew,

> On 12/20/19 10:21 AM, Pengfei Li wrote:
> > Since Nick's recent metaspace reservation fix [1] has completely removed
> the use of r27, my patch becomes much simpler now. I have removed the
> condition of UseCompressedClassPointers, rebased the code and created a
> new webrev. Could you please help review again?
> 
> What happens when we use Graal as a replacement for C2, particularly when
> Graal needs a heap base register?

Regarding your question, the Graal compiler (particularly on AArch64) uses r27 for compressing and uncompressing oops. Neither compressing nor uncompressing klass pointers uses r27. See code at [1], [2].

In Graal, we also wanted to make the heap base register allocatable when UseCompressedOops is off. Since before, AArch64 HotSpot didn't support r27 as an allocatable register, Graal patch e4d9c5f [3] marked r27 as non-allocatable and JVMCI patch JDK-8231754 [4] reserved r27 unconditionally. That's why I would like to revert JDK-8231754 in my patch.

[1] https://github.com/oracle/graal/blob/master/compiler/src/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRGenerator.java#L256
[2] https://github.com/oracle/graal/blob/master/compiler/src/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRGenerator.java#L286
[3] https://github.com/oracle/graal/commit/e4d9c5f09a3c9be9f3c66ff0feff787519875a12
[4] http://hg.openjdk.java.net/jdk/jdk/rev/d068b1e534de

--
Thanks,
Pengfei



More information about the hotspot-compiler-dev mailing list