RFR: 8231754: [JVMCI] Make r27 unconditionally reserved in JVMCI

Yudi Zheng yudi.zheng at oracle.com
Fri Oct 11 08:55:44 UTC 2019


As Gilles said, at the moment we took a conservative approach and align 
with C1/C2
by not marking r27 as allocatable. We did not investigate further and 
check whether
cpu/aarch64/sharedRuntime_aarch64.cpp:RegisterSaver::save_live_registers
is the only place assuming r27 is not allocatable.

It would be great to use some help from the AArch64 experts to properly 
address this
issue. To reproduce, follow the instructions at 
https://github.com/oracle/graal/issues/1704
You will need to revert 
https://github.com/oracle/graal/commit/e4d9c5f09a3c9be9f3c66ff0feff787519875a12
to allow Graal compiler allocate r27.

-Yudi

On 10/11/19 10:27 AM, Andrew Dinn wrote:
>> On 11/10/2019 07:47, dean.long at oracle.com wrote:
>>> Wouldn't it be better to make r27 callee-saved in
>>> cpu/aarch64/sharedRuntime_aarch64.cpp:RegisterSaver::save_live_registers()?
> On 11/10/2019 08:55, Gilles Duboscq wrote:
>> The idea was to first bring JVMCI in line with what the other compilers
>> do (never allocate r27) and then investigate how we could make r27
>> conditionally allocatable if there is interest.
> I prefer Dean's suggestion. If I understand this patch correctly it
> seems it was motivated by a desire to deal with the failure to mark r27
> as callee-saved in save_live_registers when it has been made
> allocatable. Bypassing that bug by disabling the optimization seems to
> me to be a needless regression; why not just fix the bug? (also, see below).
>
> n.b. I guess that also answers your speculation as to whether anyone is
> interested in allocating conditionally -- we were interested enough some
> time ago to implement this.
>
> When you say 'other compilers' are you referring to the Graal JIT? Or is
> there also a problem with C1 and/or C2? (or maybe some other JVMCI
> compiler we don't yet know about? ;-).
>
> If the problem is just that Graal cannot work safely when r27 is
> allocatable then can we not change the condition for enabling use of r27
> to include a test that JVMCI is disabled? (and fix the callee_saved
> issue at the same time, of course :).
>
> regards,
>
>
> Andrew Dinn
> -----------
> Senior Principal Software Engineer
> Red Hat UK Ltd
> Registered in England and Wales under Company Registration No. 03798903
> Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander


More information about the hotspot-compiler-dev mailing list