Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

luchenlin
Copy link
Contributor

@luchenlin luchenlin commented Dec 6, 2023

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

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8307683 needs maintainer approval

Issue

  • JDK-8307683: Loop Predication should not hoist range checks with trap on success projection by negating their condition (Bug - P3 - Approved)

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

@luchenlin luchenlin changed the title Andrew lu backport 8307683 Backport dfd3da3f52480f68f653beb1e720691f8232ace7 Dec 6, 2023
@bridgekeeper
Copy link

bridgekeeper bot commented Dec 6, 2023

👋 Welcome back andrewlu! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot changed the title Backport dfd3da3f52480f68f653beb1e720691f8232ace7 8307683: Loop Predication should not hoist range checks with trap on success projection by negating their condition Dec 6, 2023
@openjdk
Copy link

openjdk bot commented Dec 6, 2023

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Dec 6, 2023
@mlbridge
Copy link

mlbridge bot commented Dec 6, 2023

Webrevs

Copy link
Contributor

@RealLucy RealLucy left a 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.

@openjdk
Copy link

openjdk bot commented Dec 12, 2023

⚠️ @luchenlin This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@openjdk openjdk bot added the approval label Dec 13, 2023
@openjdk
Copy link

openjdk bot commented Dec 13, 2023

@luchenlin This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

8307683: Loop Predication should not hoist range checks with trap on success projection by negating their condition

Reviewed-by: lucy

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 master branch:

  • 7833ea8: 8219585: [TESTBUG] sun/management/jmxremote/bootstrap/JMXInterfaceBindingTest.java passes trivially when it shouldn't
  • 878c107: 8300269: The selected item in an editable JComboBox with titled border is not visible in Aqua LAF
  • 9761bc9: 8286846: test/jdk/javax/swing/plaf/aqua/CustomComboBoxFocusTest.java fails on mac aarch64
  • 04b1f4c: 8238274: (sctp) JDK-7118373 is not fixed for SctpChannel
  • 5be448f: 8299494: Test vmTestbase/nsk/stress/except/except011.java failed: ExceptionInInitializerError: target class not found
  • 8b61278: 8054572: [macosx] JComboBox paints the border incorrectly
  • d08a3d0: 8314883: Java_java_util_prefs_FileSystemPreferences_lockFile0 write result errno in missing case
  • 0ce4c5e: 7132796: [macosx] closed/javax/swing/JComboBox/4517214/bug4517214.java fails on MacOS
  • 420a68e: 7148092: [macosx] When Alt+down arrow key is pressed, the combobox popup does not appear.
  • 05bb69d: 8290399: [macos] Aqua LAF does not fire an action event if combo box menu is displayed
  • ... and 34 more: https://git.openjdk.org/jdk11u-dev/compare/360bab8a084b2c7b76af47245dd036c2c2c761c7...master

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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed approval labels Dec 13, 2023
@luchenlin
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Dec 14, 2023

Going to push as commit 1adabcd.
Since your change was applied there have been 47 commits pushed to the master branch:

  • b3d7b57: 8316461: Fix: make test outputs TEST SUCCESS after unsuccessful exit
  • ccc74bb: 8208623: [TESTBUG] runtime/LoadClass/LongBCP.java fails in AUFS file system
  • 7d85ecf: 8202282: [TESTBUG] appcds TestCommon.makeCommandLineForAppCDS() can be removed
  • 7833ea8: 8219585: [TESTBUG] sun/management/jmxremote/bootstrap/JMXInterfaceBindingTest.java passes trivially when it shouldn't
  • 878c107: 8300269: The selected item in an editable JComboBox with titled border is not visible in Aqua LAF
  • 9761bc9: 8286846: test/jdk/javax/swing/plaf/aqua/CustomComboBoxFocusTest.java fails on mac aarch64
  • 04b1f4c: 8238274: (sctp) JDK-7118373 is not fixed for SctpChannel
  • 5be448f: 8299494: Test vmTestbase/nsk/stress/except/except011.java failed: ExceptionInInitializerError: target class not found
  • 8b61278: 8054572: [macosx] JComboBox paints the border incorrectly
  • d08a3d0: 8314883: Java_java_util_prefs_FileSystemPreferences_lockFile0 write result errno in missing case
  • ... and 37 more: https://git.openjdk.org/jdk11u-dev/compare/360bab8a084b2c7b76af47245dd036c2c2c761c7...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Dec 14, 2023
@openjdk openjdk bot closed this Dec 14, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Dec 14, 2023
@openjdk
Copy link

openjdk bot commented Dec 14, 2023

@luchenlin Pushed as commit 1adabcd.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport integrated Pull request has been integrated
2 participants