Skip to content

8347901: C2 should remove unused leaf / pure runtime calls#452

Open
tabjy wants to merge 1 commit intoopenjdk:masterfrom
tabjy:backport-tabjy-ed70910b-master
Open

8347901: C2 should remove unused leaf / pure runtime calls#452
tabjy wants to merge 1 commit intoopenjdk:masterfrom
tabjy:backport-tabjy-ed70910b-master

Conversation

@tabjy
Copy link
Copy Markdown
Member

@tabjy tabjy commented Apr 7, 2026

Hi all,

This pull request contains a backport of commit ed70910b from the openjdk/jdk repository. This is a clean backport.

In addition to fixing leaf / pure runtime calls not eliminated when the result is not used, this commit is also necessary for backporting JDK-8378713, which is in process backporting to jdk26u and eventually this repo as well.

The commit being backported was authored by Marc Chevalier on 22 Jul 2025 and was reviewed by Tobias Hartmann and Vladimir Ivanov.

Thanks!


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8347901 needs maintainer approval

Issue

  • JDK-8347901: C2 should remove unused leaf / pure runtime calls (Enhancement - P3 - Rejected)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk25u-dev.git pull/452/head:pull/452
$ git checkout pull/452

Update a local copy of the PR:
$ git checkout pull/452
$ git pull https://git.openjdk.org/jdk25u-dev.git pull/452/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 452

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk25u-dev/pull/452.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper bot commented Apr 7, 2026

👋 Welcome back kxu! 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
Copy Markdown

openjdk bot commented Apr 7, 2026

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

@openjdk openjdk bot changed the title Backport ed70910b0f3e1b19d915ec13ac3434407d01bc5d 8347901: C2 should remove unused leaf / pure runtime calls Apr 7, 2026
@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 7, 2026

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required labels Apr 7, 2026
@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 7, 2026

⚠️ @tabjy This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 7, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge bot commented Apr 7, 2026

Webrevs

@tabjy
Copy link
Copy Markdown
Member Author

tabjy commented Apr 7, 2026

/approval request Fix Request 25u-dev
Allows removing unused leaf/pure runtime calls during IGVN. This is also a dependency for JDK-8378713 that provides necessary infrastructure for constant-folding call nodes. The latter resolves a performance regression.
Risk is low. The patch modifies C2's call node logic to identify and eliminate pure calls that do not have side effects and whose outputs are unused.
Applies cleanly. tier1 and tier2-ctw pass. Unfortunately I don't have the resources to run all of tier2.

@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 7, 2026

@tabjy
8347901: The approval request has been created successfully.

@openjdk openjdk bot added approval Requires approval; will be removed when approval is received and removed approval Requires approval; will be removed when approval is received labels Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

1 participant