RFR: 8327661: C1: Make RBP allocatable on x64 when PreserveFramePointer is disabled

Denghui Dong ddong at openjdk.org
Mon Mar 11 11:21:18 UTC 2024


Hi,

Could I have a review of this change that makes RBP allocatable in c1 register allocation when PreserveFramePointer is not enabled.

There seems no reason that RBP cannot be used. Although the performance of c1 jit code is not very critical, in my opinion, this change will not add overhead of compilation. So maybe it is acceptable.

I am not very sure if I have changed all the places that should be.

Performance:

I wrote a simple JMH included in this patch.

On Intel(R) Xeon(R) Platinum 8269CY CPU @ 2.50GHz

Before this change:


Benchmark                                                     Mode  Cnt   Score   Error  Units
C1PreserveFramePointer.WithPreserveFramePointer.calculate     avgt   16  15.270 ± 0.011  ns/op
C1PreserveFramePointer.WithoutPreserveFramePointer.calculate  avgt   16  14.479 ± 0.012  ns/op


After this change:


Benchmark                                                     Mode  Cnt   Score   Error  Units
C1PreserveFramePointer.WithPreserveFramePointer.calculate     avgt   16  15.264 ± 0.006  ns/op
C1PreserveFramePointer.WithoutPreserveFramePointer.calculate  avgt   16  14.057 ± 0.005  ns/op



Testing: fastdebug tier1-4 on Linux x64

-------------

Commit messages:
 - add a jmh test
 - update comment
 - fix failure and update header
 - update comment
 - 8327661: C1: Make RBP allocatable on x64 when PreserveFramePointer is disabled

Changes: https://git.openjdk.org/jdk/pull/18167/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18167&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8327661
  Stats: 134 lines in 5 files changed: 109 ins; 1 del; 24 mod
  Patch: https://git.openjdk.org/jdk/pull/18167.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18167/head:pull/18167

PR: https://git.openjdk.org/jdk/pull/18167


More information about the hotspot-compiler-dev mailing list