RFR: 8343067: C2: revisit constant-offset AddP chains after successful input idealizations
Roberto Castañeda Lozano
rcastanedalo at openjdk.org
Tue Nov 5 17:21:44 UTC 2024
This changeset re-adds a constant-offset AddP node (`u`) to C2's IGVN worklist when its address is given by another AddP node (`use`) whose offset has changed. This makes it possible for `AddPNode::Ideal` to flatten the address computation in cases where the offset of the latter (`use->in(AddPNode::Offset)`) is found to be constant during IGVN:

The end result is the generation of fewer explicit address computation instructions.
#### Testing
##### Functionality
- tier1-5 (linux-x64, windows-x64, macosx-x64, linux-aarch64, macosx-aarch64; release and debug mode).
##### Performance
- Tested performance on a set of standard benchmark suites (DaCapo, SPECjbb2015, SPECjvm2008). No significant change was observed.
-------------
Commit messages:
- Re-add to worklist only if it is the offset that changes
- Simplify test
- Remove test condition
- Generalize test for aarch64
- Merge better with surrounding code
- Add tentative solution (guarded with UseNewCode)
- Add test case
Changes: https://git.openjdk.org/jdk/pull/21898/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21898&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8343067
Stats: 73 lines in 3 files changed: 70 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/21898.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/21898/head:pull/21898
PR: https://git.openjdk.org/jdk/pull/21898
More information about the hotspot-compiler-dev
mailing list