RFR: JDK-8217909: Make unused r12 register (without compressed oops) available to regalloc in C2
per.liden at oracle.com
Mon Feb 11 20:24:50 UTC 2019
On 02/11/2019 12:02 PM, Roman Kennke wrote:
> When running with compressed oops, the r12 register holds the heapbase,
> and thus is not available to register allocation in C2. However, when
> *not* running with compressed oops, it is still not available and
> remains unused. It should be made available to register allocation in
> this case.
> This patch implements this by introducing with_r12 and no_r12 variants
> of basically all register classes, and add dynamic reg classes to select
> one or the other, based on current settings. I needed to add UseZGC in
> those flags because ZGC asserts to not get r12 in its barriers. Not sure
> that this is necessary.
I'll file a separate RFE to fix the ZGC barriers after your patch is in.
> Note that we might want to use the r12 register in Shenandoah later to
> keep GC state. In this case, we'd need to add UseShenandoahGC or such to
> the test. Do we want to abstract this whole check? Not sure that this is
> possible/feasible to do in .ad though...
> Testing: tier1 no regressions locally, eyeball generated code, yes it
> does use r12 now.
> Can I please get reviews?
More information about the hotspot-compiler-dev