-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8342393: Promote commutative vector IR node sharing #22863
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 jbhateja! A progress list of the required criteria for merging this PR into |
|
@jatin-bhateja 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 22 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 |
|
@jatin-bhateja The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
iwanowww
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.
Nice improvement, Jatin.
eme64
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 promising, thanks for the work!
test/hotspot/jtreg/compiler/vectorapi/VectorCommutativeOperSharingTest.java
Show resolved
Hide resolved
e9be0de to
3291931
Compare
|
@jatin-bhateja Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information. |
|
Hi @eme64, Your comments have been addressed. Kindly verify. |
test/hotspot/jtreg/compiler/vectorapi/VectorCommutativeOperSharingTest.java
Outdated
Show resolved
Hide resolved
edb1ced to
99ede6f
Compare
|
@jatin-bhateja Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information. |
|
Hi @iwanowww , @eme64 , @XiaohongGong , your comments have been addressed. |
eme64
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.
I have a general question about the approach:
For commutative scalar ops (add, mul, etc), we reorder the edges to allow commoning.
// Otherwise, sort inputs (commutativity) to help value numbering.
if( in1->_idx > in2->_idx ) {
add->swap_edges(1, 2);
return true;
}
Have you considered doing the same with vectors?
Or should we rather refactor also the scalars with the check_for_collision, and have a is_commutative_operation for scalar and vector ops?
I'm just afraid that we have now 2 ways of doing things, making things unnecessarily complicated.
Also the basic hash / hash collision functions now have an extra check. Probably the overhead is negligible, but who knows - they used to have goto there for performance... what do you think?
|
I discussed it quickly with @TobiHartmann . We think it is nicer if we can do a general refactoring:
For us it is ok if you just apply it basically as is - and file a follow-up RFE so we can refactor away all these: We have such Alternatively, we first do this refactoring just for the scalar nodes, and then your patch only has to apply it for vector cases. Since this is touching core |
|
/reviewers 3 reviewer Increasing the level so that @TobiHartmann @vnkozlov also sign off on this. |
cab9871 to
f629a6f
Compare
|
@jatin-bhateja Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information. |
|
Hi @eme64 , I have lowered the feature check to IR annotation for now. |
|
@jatin-bhateja Launched testing for Commit 17 / v22. |
|
Hi @eme64 , Kindly share the results of your test runs. |
|
@jatin-bhateja Tests look all good on my side. I'll make another pass in the next few days, and hopefully approve. |
|
Hi @eme64 , All comments addressed, looking forward to your approval |
|
@jatin-bhateja Perfect, it looks good now. Let me run testing one more time just to be sure. Please ping me in a day or so for the results! |
|
Hi @eme64 , Let us know if its good to land. |
eme64
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.
Testing passed. Approved. Thanks for the work @jatin-bhateja :)
sviswa7
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 to me.
|
Hi @TobiHartmann , @iwanowww , Can you kindly approve the patch its waiting for one more approval. |
iwanowww
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 even better!
|
/integrate |
|
Going to push as commit e410af0.
Your commit was automatically rebased without conflicts. |
|
@jatin-bhateja Pushed as commit e410af0. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |


Patch promotes the sharing of commutative vector IR with the same inputs but different input ordering.
Similar to scalar IR where we perform edge swapping by sorting inputs based on node indices during IR idealization.
Following are the performance stats for JMH micro included with the patch.
Please review and share your comments.
Best Regards,
Jatin
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22863/head:pull/22863$ git checkout pull/22863Update a local copy of the PR:
$ git checkout pull/22863$ git pull https://git.openjdk.org/jdk.git pull/22863/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 22863View PR using the GUI difftool:
$ git pr show -t 22863Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22863.diff
Using Webrev
Link to Webrev Comment