-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
8253734: C2: Optimize Move nodes #826
Conversation
/label add hotspot-compiler |
👋 Welcome back vlivanov! A progress list of the required criteria for merging this PR into |
@iwanowww |
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.
Maybe add some comments with examples to the reinterpret methods.
src/hotspot/share/opto/movenode.hpp
Outdated
public: | ||
MoveL2DNode( Node *value ) : Node(0,value) {} | ||
MoveL2DNode(Node* value) : MoveNode(value) { | ||
init_class_id(Class_Move); |
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.
Shouldn't init_class_id
be moved to the MoveNode
constructor?
src/hotspot/share/opto/movenode.hpp
Outdated
public: | ||
virtual Node* Ideal(PhaseGVN* phase, bool can_reshape); | ||
virtual Node* Identity(PhaseGVN* phase); | ||
// virtual const Type* Value(PhaseGVN* phase) const; |
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.
Can be removed.
Thanks for the quick feedback, Tobias! Please, take a look at the updated version. |
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. Thanks for making these changes!
@iwanowww 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 53 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!
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.
Proposed optimization looks fine. In what cases you see the issues?
Mailing list message from Vladimir Ivanov on hotspot-compiler-dev: Thanks for the reviews, Vladimir and Tobias.
It was motivated by some microbenchmarks targeting Memory Access API: https://mail.openjdk.java.net/pipermail/panama-dev/2020-September/010873.html Best regards, |
Mailing list message from Vladimir Kozlov on hotspot-compiler-dev: On 10/23/20 11:17 AM, Vladimir Ivanov wrote:
Okay. Thanks,
|
/integrate |
Thanks for the reviews, Vladimir, Tobias, and Nils. |
@iwanowww Since your change was applied there have been 69 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 83a91bf. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Introduce the following transformations for Move nodes:
MoveI2F (MoveF2I x) => x
MoveI2F (LoadI mem) => LoadF mem
StoreI mem (MoveF2I x) => StoreF mem x
(The same applies to MoveL2D/MoveD2L.)
№1 eliminates redundant operations and №2/№3 avoid reg-to-reg moves in generated code:
vs
(№2 and №3 are performed late (after loop opts are over) to avoid high-level optimizations passes to handle newly introduced mismatched accesses.)
Testing: tier1-5.
Progress
Testing
Failed test task
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/826/head:pull/826
$ git checkout pull/826