-
Notifications
You must be signed in to change notification settings - Fork 6k
8277882: New subnode ideal optimization: converting "c0 - (x + c1)" into "(c0 - c1) - x" #6441
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
8277882: New subnode ideal optimization: converting "c0 - (x + c1)" into "(c0 - c1) - x" #6441
Conversation
Hi @CptGit, welcome to this OpenJDK project and thanks for contributing! We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user CptGit" as summary for the issue. If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing |
/signed |
Thank you! Please allow for up to two weeks to process your OCA, although it is usually done within one to two business days. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated! |
Hi, |
You should provide a microbenchmark to prove the effectiveness of the transformations, too. |
… added for subnode.
@merykitty Thank you for your comments. I made the merging and included both jtreg and microbenchmark tests. Please let me know if you have any other comments. |
Hi @CptGit, You need to open a enhancement-bug at https://bugs.openjdk.java.net/ for this PR. The title of this PR must then be changed to "bug-number: bug-title" where the title matches the title of the bug. Regards, |
Thank you Nils @neliasso . I don't have an account for OpenJDK. Do you know how I can get one? I've already signed OCA and been approved. |
Associated JBS issue - https://bugs.openjdk.java.net/browse/JDK-8277882 |
Webrevs
|
I think your tests need to check more cases, especially cases that use MIN_VALUE, MAX_VALUE, or otherwise cause underflow or overflow. |
/reviewers 2 |
@dean-long |
I think this could be merged with the transformation on line 216 (the one converts "x - (y+c0)" into "(x-y) - c0") and doing a branch on the constness of |
Testing results for 5965a8c look good. |
Do you want to make the same change to SubLNode for completeness, and adds tests for "long" like you did for "int"? |
Added the same transformation for "long" as well as tests. Also renamed tests to more meaningful names. |
The failure of |
The latest changes still look good to me. |
Looks like it's failing one the tests on 32-bit |
I believe the test will be passing after merging to master. Let me try to merge. |
|
@CptGit 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 1 new commit pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@dean-long, @veresov) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
/integrate |
/sponsor |
Going to push as commit 3524355.
Your commit was automatically rebased without conflicts. |
Suggest two new optimizations that can be done in SubINode::Ideal.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6441/head:pull/6441
$ git checkout pull/6441
Update a local copy of the PR:
$ git checkout pull/6441
$ git pull https://git.openjdk.java.net/jdk pull/6441/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 6441
View PR using the GUI difftool:
$ git pr show -t 6441
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6441.diff