RFR: 8373633: C2: Use interface receiver type to improve CHA decisions
Vladimir Ivanov
vlivanov at openjdk.org
Sat Dec 13 02:32:23 UTC 2025
Strength-reducing an interface call to a virtual call for interfaces with
unique implementors can use receiver type information to narrow the context.
C2 tracks interface types and receiver type information can be used to reveal
an interface with a unique implementor which can't be derived from the call
site itself.
Since C2 effectively accumulates a union interface type from multiple subtype checks, iterating over individual components of a type may reveal a candidate for a strength-reduction. The only prerequisite is that a candidate has to be a subtype of the declared interface.
Testing: hs-tier1 - hs-tier5
-------------
Commit messages:
- Use receiver type to improve CHA decisions
Changes: https://git.openjdk.org/jdk/pull/28811/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28811&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8373633
Stats: 255 lines in 7 files changed: 157 ins; 51 del; 47 mod
Patch: https://git.openjdk.org/jdk/pull/28811.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28811/head:pull/28811
PR: https://git.openjdk.org/jdk/pull/28811
More information about the hotspot-compiler-dev
mailing list