-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8263376: CTW (Shenandoah): assert(mems <= 1) failed: No node right after call if multiple mem projections #3006
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
Conversation
👋 Welcome back roland! A progress list of the required criteria for merging this PR into |
@rwestrel The |
Webrevs
|
Anyone for a review of this relatively simple change? Change is in shared code. |
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.
Okay.
@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 246 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.
You should also add the bug number to the test.
Otherwise, looks good to me.
done.
Thanks for the review. |
thanks for the review |
/integrate |
@rwestrel Since your change was applied there have been 246 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 33c94ff. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This is another case of anti-dependence analysis being too conservative.
In TestBadRawMemoryAfterCall.test2(), test
if (i == 42) {
is split thru the Phi that merges values from the fallthru and
exception paths. As a consequence, control flow at the call is
roughly:
When anti-dependence analysis runs for the load after the call, it
starts from the memory state out of the call on the fallthru path. One
use is a memory Phi at Region2 (say Phi2). Another path leads to
Region1 at, say, Phi1.
When anti-dependence analysis then goes over Phis, it processes Phi2,
goes over the its inputs and finds that 2 are reachable: the one that
has a direct edge to the memory state on the fallthru path and the one
from Phi1. As a consequence, control for the load is set to be right
after the call, which is too conservative.
When following the memory edges, the code stops at Phi1. It doesn't
process uses of Phi1. Any anti-dependence that's needed between the
load and Phi1 is then taken into account when Phis are processed. When
inputs to Phi2 are processed, considering the Phi2->Phi1 is too
conservative. As mentioned above, anti-dependences for Phi1 are taken
into account separately. I think it's true for all Phi->Phi edges that
they can be safely ignored. That's what I propose as a fix.
/cc shenandoah,hotspot-compiler
Progress
Issue
Reviewers
Download
To checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3006/head:pull/3006
$ git checkout pull/3006
To update a local copy of the PR:
$ git checkout pull/3006
$ git pull https://git.openjdk.java.net/jdk pull/3006/head