-
Notifications
You must be signed in to change notification settings - Fork 236
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
8307683: Loop Predication should not hoist range checks with trap on success projection by negating their condition #2340
Conversation
👋 Welcome back andrewlu! A progress list of the required criteria for merging this PR into |
This backport pull request has now been updated with issue from the original commit. |
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.
|
@luchenlin This change now passes all automated pre-integration checks. 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 44 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 |
/integrate |
Going to push as commit 1adabcd.
Your commit was automatically rebased without conflicts. |
@luchenlin Pushed as commit 1adabcd. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
I backport this for parity with 11.0.23-oracle.
To solve the error after backport, follow the jdk17 backport, openjdk/jdk17u-dev#1553
as Goetz describe, the changes are:
Resolves in detail:
src/hotspot/share/opto/loopPredicate.cpp
In head, there are two variants of is_range_check_if(), 11 has only one. Omitted the changes to the second one.
loop_predication_impl_helper()
Renamed the variable. In head, it is if_proj->if_success_proj, here it is proj->success_proj.
I introduce a new vairalbe IfProjNode if_success_proj. Calls to loop_predication_impl_helper
pass Projs and not IfProjs, so this seems cleaner. Added assertion.
Passing proj instead of if to is_range_check_if().
Computation of the deleted "bool negate" differs. Deleted anyways.
Removed all the uses of negate.
src/hotspot/share/opto/loopTransform.cpp
Trivial resolve.
src/hotspot/share/opto/loopnode.cpp
extract_long_range_checks() was introduced in "8259609: C2: optimize long range checks in long counted loops".
The change is only needed as the input to is_range_check_if() was
changed from the IfNode to the IfProjNode below. The change here has no effect on the fix. Skipped.
patching file src/hotspot/share/opto/loopnode.hpp
Resolved, simple differences.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk11u-dev.git pull/2340/head:pull/2340
$ git checkout pull/2340
Update a local copy of the PR:
$ git checkout pull/2340
$ git pull https://git.openjdk.org/jdk11u-dev.git pull/2340/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 2340
View PR using the GUI difftool:
$ git pr show -t 2340
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk11u-dev/pull/2340.diff
Webrev
Link to Webrev Comment