-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8274130: C2: MulNode::Ideal chained transformations may act on wrong nodes #5631
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
8274130: C2: MulNode::Ideal chained transformations may act on wrong nodes #5631
Conversation
|
👋 Welcome back shade! A progress list of the required criteria for merging this PR into |
Webrevs
|
|
This is actually cleaner but I'm not sure the change is strictly needed. In these specific transforms I think the types of the operands and the operation ought never to differ. e.g for the multuply rule we transform (MulF (MinusF f2) (MinusF f2)) ==> (MulF f1 f2. The types of the MinusF terms input to the MulF both have to be float. So, do the types of the inputs f1 and f2. We should never get an input graph that has, say, a float for one arg and a double for another. |
For types and current transforms, that might be true. It might not hold true in future. The patch, however, also makes sure these lines refer to the most actual nodes: |
TobiHartmann
left a comment
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 (I would prefer the pointer asterisk next to the type though).
Aligned! See new commit. |
TobiHartmann
left a comment
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 changing.
|
@shipilev 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 93 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 |
vnkozlov
left a comment
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.
Good.
|
Thanks! /integrate |
|
Going to push as commit 756d22c.
Your commit was automatically rebased without conflicts. |
I was puzzled by it when fixing JDK-8274060. It looks that new optimizations added by JDK-8273454 and JDK-8263006 rewire
in(1)andin(2)inMulNode::Ideal, which means the chained transformations should see them? Yet, both inputs and theirType-s are cached locally and not refreshed. I have not seen failures due to this yet, but it looks that the current code is subtly incorrect because of this.I thought about doing
return thisinstead ofprogress = true, so that we leaveMulNode::Idealonce we hit any transform and hope to return back, but I wondered if that would expose us to different graph shapes in-between successiveMulNode::Idealcalls, which might have other unintended consequences. Therefore, I opted to a more conservative patch.Additional testing:
compiler/teststier1testsProgress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5631/head:pull/5631$ git checkout pull/5631Update a local copy of the PR:
$ git checkout pull/5631$ git pull https://git.openjdk.java.net/jdk pull/5631/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 5631View PR using the GUI difftool:
$ git pr show -t 5631Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5631.diff