Skip to content

Conversation

@iwanowww
Copy link
Contributor

@iwanowww iwanowww commented Dec 13, 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


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8373633: C2: Use interface receiver type to improve CHA decisions (Enhancement - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28811/head:pull/28811
$ git checkout pull/28811

Update a local copy of the PR:
$ git checkout pull/28811
$ git pull https://git.openjdk.org/jdk.git pull/28811/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28811

View PR using the GUI difftool:
$ git pr show -t 28811

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28811.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 13, 2025

👋 Welcome back vlivanov! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Dec 13, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk
Copy link

openjdk bot commented Dec 13, 2025

@iwanowww this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout cha.intf.recv
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk openjdk bot added merge-conflict Pull request has merge conflict with target branch hotspot-compiler hotspot-compiler-dev@openjdk.org labels Dec 13, 2025
@openjdk
Copy link

openjdk bot commented Dec 13, 2025

@iwanowww The following label will be automatically applied to this pull request:

  • hotspot-compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot removed the merge-conflict Pull request has merge conflict with target branch label Dec 13, 2025
@iwanowww iwanowww marked this pull request as ready for review December 13, 2025 02:28
@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 13, 2025
@mlbridge
Copy link

mlbridge bot commented Dec 13, 2025

Webrevs

jvms,
allow_inline,
_prof_factor,
nullptr /*receiver_type*/,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no benefit to passing receiver_type here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot-compiler hotspot-compiler-dev@openjdk.org rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants