JDK-8064625 : ARM: C2 register pressure looks wrong
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8,9
  • Priority: P5
  • Status: Open
  • Resolution: Unresolved
  • OS: linux
  • CPU: arm
  • Submitted: 2014-11-11
  • Updated: 2021-07-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Description
1) Problem with VecX

For all vector types, we do the following on all platforms:
          lrg.set_reg_pressure(1);
For 32-bit ARM, with a FLOATPRESSURE  value of 30 and set_reg_pressure(1), we calculate 30 VecX vector registers,
but the hardware actually supports 15 VecX vector registers (actually 16, but accounting for S14/S15/D7 that we reserve).

2) Problem with RegD

We also calculate 15 RegD instead of the correct 30 RegD.

3) The above numbers assume that VM_Version::has_vfp3_32() returns true.  If it returns false, the number of RegD,
VecD, and VecX available in C2 are cut in half, but the number of RegF and VecS stay the same.  A single value for
FLOATPRESSURE  and a static value for lrg.set_reg_pressure() makes it impossible to adjust for  the
has_vfp3_32() value at runtime.

Rather than INTPRESSURE, FLOATPRESSURE, and platform-specific set_reg_pressure() values in shared code using
ifdefs, it seems better to define an interface to allow better tuning of these values.
Comments
ILW=Possible perf impact, c2 on arm, none=LMH=P5
14-11-2014