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

8297951: C2: Create skeleton predicates for all If nodes in loop predication #11454

Closed
wants to merge 2 commits into from

Conversation

chhagedorn
Copy link
Member

@chhagedorn chhagedorn commented Dec 1, 2022

We currently only create skeleton predicates for RangeCheck nodes and not for normal If nodes:

if (iff->is_RangeCheck()) {
new_predicate_proj = insert_initial_skeleton_predicate(iff, loop, proj, predicate_proj, upper_bound_proj, scale, offset, init, limit, stride, rng, overflow, reason);
}

But it is also possible to create range check predicates in loop predication for If nodes if they have the right pattern checked in PhaseIdealLoop::loop_predication_impl() and IdealLoopTree::is_range_check_if(). This, however, is much more rare.

Without skeleton predicates for these If nodes, we could run into the same problems already fixed for RangeCheck nodes (see JDK-8193130 and related bugs). This is almost impossible to trigger in practice as it needs a very specific setup and the right optimizations to be applied. But the test case shows such a case where we hit an assert due to a broken memory graph because we are missing skeleton predicates.

I therefore propose to always create skeleton predicates for hoisted range checks in loop predication.

Thanks,
Christian


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

Issue

  • JDK-8297951: C2: Create skeleton predicates for all If nodes in loop predication

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11454/head:pull/11454
$ git checkout pull/11454

Update a local copy of the PR:
$ git checkout pull/11454
$ git pull https://git.openjdk.org/jdk pull/11454/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 11454

View PR using the GUI difftool:
$ git pr show -t 11454

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11454.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 1, 2022

👋 Welcome back chagedorn! 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
Copy link

openjdk bot commented Dec 1, 2022

@chhagedorn The following label will be automatically applied to this pull request:

  • hotspot-compiler

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.

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Dec 1, 2022
@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 1, 2022
@mlbridge
Copy link

mlbridge bot commented Dec 1, 2022

Webrevs

Copy link
Member

@TobiHartmann TobiHartmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me. Great that you were able to find a test!

@openjdk
Copy link

openjdk bot commented Dec 2, 2022

@chhagedorn 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:

8297951: C2: Create skeleton predicates for all If nodes in loop predication

Reviewed-by: thartmann, kvn

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 240 new commits pushed to the master branch:

  • 7d20a60: 8297489: Modify TextAreaTextEventTest.java as to verify the content change of TextComponent sends TextEvent
  • 601264d: 8273357: SecurityManager deprecation warning from java/awt/regtesthelpers/Util.java
  • 6a7a0db: 8296619: Upgrade jQuery to 3.6.1
  • a38c63d: 8297733: Refactor Cast binding to enum
  • 19d8498: 8297495: j.u.concurrent updates for JDK 20
  • 3288459: 8297606: [AIX] Broken build after JDK-8295475
  • 0452c39: 8296477: Foreign linker implementation update following JEP 434
  • 73baadc: 8295044: Implementation of Foreign Function and Memory API (Second Preview)
  • bd38188: 8297766: Remove UseMallocOnly development option
  • b9eec96: 8281214: Unsafe use of long in VMThread::setup_periodic_safepoint_if_needed
  • ... and 230 more: https://git.openjdk.org/jdk/compare/bcc6b12b711a9c5007d963123fb38a7e72aaf8e5...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 the ready Pull request is ready to be integrated label Dec 2, 2022
@chhagedorn
Copy link
Member Author

Thanks Tobias for your review!

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense.

@chhagedorn
Copy link
Member Author

Thank you Vladimir for your review!

@chhagedorn
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Dec 6, 2022

Going to push as commit 0bd04a6.
Since your change was applied there have been 250 commits pushed to the master branch:

  • f5ad515: 8297247: Add GarbageCollectorMXBean for Remark and Cleanup pause time in G1
  • e975418: 8298102: Remove DirtyCardToOopClosure::_last_explicit_min_done
  • 04012c4: 8298111: Cleanups after UseMallocOnly removal
  • ee9ba74: 8295184: Printing messages with a RecordComponentElement does not include position
  • ba2d28e: 8298027: Remove SCCS id's from awt jtreg tests
  • 8d8a28f: 8296489: tools/jpackage/windows/WinL10nTest.java fails with timeout
  • 884b9ad: 8293453: tools/jpackage/share/AddLShortcutTest.java "Failed: Check the number of mismatched pixels [1024] of [1024] is < [0.100000] threshold"
  • 8af6e8a: 8298123: Problem List MaximizedToIconified.java on macOS
  • da0917a: 8297729: Replace GrowableArray in ComputeMoveOrder with hash table
  • 9827b75: 8298043: jdk/jfr/api/consumer/recordingstream/TestStop.java failed with "Expected outer stream to have 3 events"
  • ... and 240 more: https://git.openjdk.org/jdk/compare/bcc6b12b711a9c5007d963123fb38a7e72aaf8e5...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Dec 6, 2022

@chhagedorn Pushed as commit 0bd04a6.

💡 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
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants