Skip to content

Conversation

@rwestrel
Copy link
Contributor

@rwestrel rwestrel commented May 30, 2022

nb counts the number of loops that share a single head. The assert
that fires is in code that handles the case of a self loop (a loop
composed of a single block). There can be a self loop and multiple
loops that share a head: the assert makes little sense and I propose
to simply remove it.

I think there's another issue with this code: in the case of a self
loop and multiple loops that share a head, the self loop can be any of
the loop for which the head is cloned not only the one that's passed
as argument to ciTypeFlow::clone_loop_head(). As a consequence, I
moved the logic for self loops in the loop that's applied to all loops
that share the loop head.


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-8286451: C2: assert(nb == 1) failed: only when the head is not shared

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/8947/head:pull/8947
$ git checkout pull/8947

Update a local copy of the PR:
$ git checkout pull/8947
$ git pull https://git.openjdk.java.net/jdk pull/8947/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 8947

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/8947.diff

@bridgekeeper
Copy link

bridgekeeper bot commented May 30, 2022

👋 Welcome back roland! 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 added the rfr Pull request is ready for review label May 30, 2022
@openjdk
Copy link

openjdk bot commented May 30, 2022

@rwestrel 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 May 30, 2022
@mlbridge
Copy link

mlbridge bot commented May 30, 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. I submitted testing and will report back once it passed.

@openjdk
Copy link

openjdk bot commented Jun 7, 2022

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

8286451: C2: assert(nb == 1) failed: only when the head is not shared

Reviewed-by: thartmann, chagedorn

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

  • 062db59: 8286206: Missing cases for RECORD
  • ee4a6c2: 8287799: JFR: Less noisy platform threads with jfr print
  • 1499e5e: 8273573: [macos12] ActionListenerCalledTwiceTest.java fails on macOS 12
  • 2f62f15: 8287808: javac generates illegal class file for pattern matching switch with records
  • 905bcbe: 8286571: java source launcher from a minimal jdk image containing jdk.compiler fails with --enable-preview option
  • 8d28734: 8287741: Fix of JDK-8287107 (unused cgv1 freezer controller) was incomplete
  • f1dd559: 8287896: PropertiesTest.sh fail on msys2
  • 4fe0ca9: 8287860: Revise usage of volatile in j.u.Locale
  • bde7a7a: 8287236: Reorganize AST related to pattern matching for switch
  • 2d8c649: 8287663: Add a regression test for JDK-8287073
  • ... and 68 more: https://git.openjdk.java.net/jdk/compare/5acac2238fdc4ffe6ef290456e01cc559d811557...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 Jun 7, 2022
Copy link
Member

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

nb counts the number of loops that share a single head

Maybe you also want to rename the variable to make it more clear what it counts.

* @test
* @bug 8286451
* @summary C2: assert(nb == 1) failed: only when the head is not shared
* @run main/othervm TestSharedLoopHead
Copy link
Member

Choose a reason for hiding this comment

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

Could be converted to @run driver TestSharedLoopHead instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right but the test needs -XX:-BackgroundCompilation

@rwestrel
Copy link
Contributor Author

rwestrel commented Jun 7, 2022

Looks good!

Thanks for the review.

nb counts the number of loops that share a single head

Maybe you also want to rename the variable to make it more clear what it counts.

Done.

Copy link
Member

@chhagedorn chhagedorn left a comment

Choose a reason for hiding this comment

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

That looks good, thanks for doing the updates!

@TobiHartmann
Copy link
Member

All tests passed.

@rwestrel
Copy link
Contributor Author

rwestrel commented Jun 8, 2022

@chhagedorn @TobiHartmann thanks for the reviews

@rwestrel
Copy link
Contributor Author

rwestrel commented Jun 8, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Jun 8, 2022

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

  • 0960ecc: 8287700: C2 Crash running eclipse benchmark from Dacapo
  • 590337e: 8286625: C2 fails with assert(!n->is_Store() && !n->is_LoadStore()) failed: no node with a side effect
  • 4662e06: 8277307: Pre shared key sent under both session_ticket and pre_shared_key extensions
  • 7df48f9: 8287353: Use snippet tag instead of pre tag in Javadoc of InterruptedException
  • 32dd1ee: 8287967: Update golden test files after JDK-8287886
  • 45f1b72: 8287697: Limit auto vectorization to 32-byte vector on Cascade Lake
  • 39ec58b: 8287886: Further terminology updates to match JLS
  • 68c5957: 8287869: -XX:+AutoCreateSharedArchive doesn't work when JDK build is switched
  • bf439f8: 8287876: The recently de-problemlisted TestTitledBorderLeak test is unstable
  • b7a34f7: 8287927: ProblemList java/awt/GraphicsDevice/DisplayModes/UnknownRefrshRateTest.java on macosx-aarch64
  • ... and 91 more: https://git.openjdk.java.net/jdk/compare/5acac2238fdc4ffe6ef290456e01cc559d811557...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jun 8, 2022

@rwestrel Pushed as commit bf0e625.

💡 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