-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
8295788: C2 compilation hits "assert((mode == ControlAroundStripMined && use == sfpt) || !use->is_reachable_from_root()) failed: missed a node" #11162
Conversation
👋 Welcome back roland! A progress list of the required criteria for merging this PR into |
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.
Make sense.
@rwestrel This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 148 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
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.
Looks good to me otherwise.
test/hotspot/jtreg/compiler/loopstripmining/TestUseFromInnerInOuterUnusedBySfpt.java
Outdated
Show resolved
Hide resolved
src/hotspot/share/opto/loopopts.cpp
Outdated
@@ -2297,6 +2299,11 @@ void PhaseIdealLoop::clone_outer_loop(LoopNode* head, CloneLoopMode mode, IdealL | |||
clone_outer_loop_helper(old, loop, outer_loop, old_new, wq, this, true); | |||
} | |||
|
|||
for (uint i = 0; i < loop->_body.size(); i++) { | |||
Node* old = loop->_body.at(i); | |||
clone_outer_loop_helper(old, loop, outer_loop, old_new, wq, this, true); |
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.
While you're at it, could you rename the helper method to something more meaningful?
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.
Thanks for reviewing this. I did in the new commit. Does it look good to you?
…OuterUnusedBySfpt.java Co-authored-by: Tobias Hartmann <tobias.hartmann@oracle.com>
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.
Looks good, thanks for updating!
@vnkozlov @TobiHartmann thanks for the reviews. |
/integrate |
Going to push as commit 761a4f4.
Your commit was automatically rebased without conflicts. |
This failure is similar to previous failures with loop strip mining: a
node is encountered that has control set in the outer strip mined loop
but is not reachable from the safepoint. There's already logic in loop
cloning to find those and fix their control to be outside the
loop. Usually a node ends up in the outer loop because some of its
inputs is in the outer loop. The current logic to catch nodes that are
erroneously assigned control in the outer loop is to start from
safepoint's inputs and look for uses with incorrect control. That
doesn't work in this case because: 1) the node is created by
IdealLoopTree::reassociate in the outer loop because its inputs are
indeed there 2) but a pass of split if updates the control to be
inside the inner loop.
To fix this, I propose reusing the existing clone_outer_loop_helper()
but apply it to the loop body as well. I had to tweak that method
because I ran into cases of dead nodes still reachable from a node in
the loop body but removed from the _body list by
IdealLoopTree::DCE_loop_body() (and as a result not cloned).
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11162/head:pull/11162
$ git checkout pull/11162
Update a local copy of the PR:
$ git checkout pull/11162
$ git pull https://git.openjdk.org/jdk pull/11162/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 11162
View PR using the GUI difftool:
$ git pr show -t 11162
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11162.diff