RFR: 8268858: Determine register pressure automatically by the number of available registers for allocation [v3]

Joshua Zhu jzhu at openjdk.java.net
Tue Jun 22 08:00:04 UTC 2021


> Hi,
> 
> This patch includes the following changes:
> 
> 1) Determine register pressure automatically by the number of available
>    registers for allocation.
>    Currently, INTPRESSURE is hard-coded no matter whether heapbase
>    or framepointer register is available for RA.
> 
> 2) x86: Machines with AVX3 have 2x more XMM registers.
>         The pressure threshold should be improved for both RA and LCM.
>         Currently, only scheduling takes more XMM registers into
>         consideration.
> 
> 3) aarch64: add a new jtreg case
>         In bug 8183543, this case caused many compilation failures with
>         "failed spill-split-recycle sanity check". This test case is
>         imported to ensure no regression failure.
> 
> Inconsistent pressure threshold value with the number of available
> registers will bring unnecessary spilling in some scenarios.
> I wrote a simple example as one case:
>   https://cr.openjdk.java.net/~jzhu/8268858/Test.java
> 
> With this patch, 4 extra spill copies are eliminated on AArch64.
>   old OptoAssembly: https://cr.openjdk.java.net/~jzhu/8268858/old_opto_assembly
>   new OptoAssembly: https://cr.openjdk.java.net/~jzhu/8268858/new_opto_assembly
> 
> Could you please help review this patch?
> 
> Best Regards,
> Joshua

Joshua Zhu has updated the pull request incrementally with one additional commit since the last revision:

  Add more details in comments

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/4505/files
  - new: https://git.openjdk.java.net/jdk/pull/4505/files/704b468b..7c1d1080

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4505&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4505&range=01-02

  Stats: 16 lines in 2 files changed: 7 ins; 0 del; 9 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4505.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4505/head:pull/4505

PR: https://git.openjdk.java.net/jdk/pull/4505


More information about the hotspot-compiler-dev mailing list