-
Notifications
You must be signed in to change notification settings - Fork 5.9k
8354383: C2: enable sinking of Type nodes out of loop #25396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back roland! A progress list of the required criteria for merging this PR into |
@rwestrel This change is no longer ready for integration - check the PR body for details. |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks good to me but given that we had quite a few bugs in that area in the past, I would suggest to only integrate into JDK 26 after the fork on June 05, 2025.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise, looks reasonable to me, too.
@@ -1685,7 +1689,8 @@ void PhaseIdealLoop::try_sink_out_of_loop(Node* n) { | |||
!n->is_OpaqueNotNull() && | |||
!n->is_OpaqueInitializedAssertionPredicate() && | |||
!n->is_OpaqueTemplateAssertionPredicate() && | |||
!n->is_Type()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot remember exactly, how often was it a problem without JDK-8349479? If it was more common, we might want to only allow it when KillPathsReachableByDeadTypeNode
is set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made that change.
As far as I remember, the logic removed by JDK-8319372 played a key role in those failures. Not sure if any were still reproducible after than one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that matches what I remember. Maybe JDK-8319372 can now be reverted with JDK-8349479 in?
Sounds reasonable to me. |
@@ -1685,7 +1689,8 @@ void PhaseIdealLoop::try_sink_out_of_loop(Node* n) { | |||
!n->is_OpaqueNotNull() && | |||
!n->is_OpaqueInitializedAssertionPredicate() && | |||
!n->is_OpaqueTemplateAssertionPredicate() && | |||
!n->is_Type()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that matches what I remember. Maybe JDK-8319372 can now be reverted with JDK-8349479 in?
Co-authored-by: Christian Hagedorn <[email protected]>
I think it would be safe but I'm unclear if it's worth doing or not. |
I'm not sure either, we would not to further investigate if we can find cases that benefit from it. Should we file an RFE either way? |
|
PhaseIdealLoop::try_sink_out_of_loop()
excludesType
nodes becausewe ran into some issues where a
Type
node is sunk and then becomestop
but the control path of its uses doesn't become unreachable.8349479 should have fixed that so that exception no longer makes
sense.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25396/head:pull/25396
$ git checkout pull/25396
Update a local copy of the PR:
$ git checkout pull/25396
$ git pull https://git.openjdk.org/jdk.git pull/25396/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 25396
View PR using the GUI difftool:
$ git pr show -t 25396
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25396.diff
Using Webrev
Link to Webrev Comment