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

8268882: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc #6270

Closed
wants to merge 1 commit into from

Conversation

rickard
Copy link

@rickard rickard commented Nov 5, 2021

Also delete Phi nodes with no uses.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8268882: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6270

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

Using diff file

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Nov 5, 2021

👋 Welcome back rbackman! 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 label Nov 5, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Nov 5, 2021

@rickard 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 label Nov 5, 2021
@rickard
Copy link
Author

@rickard rickard commented Nov 5, 2021

The cause of hitting this assert seems to be as follows:

In regalloc the compiler decides to split a live range, generates a bunch of Phi nodes.
Later after coalescing, the need to spill has gone away and Phi nodes are now starting to be deleted.
Before this change this problematic Phi node is left in the graph because it has two inputs, two loadcon of the same
value. However The regalloc only checks for reference equality when determining if a Phi node can be deleted due to a single unique input.
Adding this check to also delete Phi nodes with no outs in this later stage makes sure these Phi nodes gets deleted as well.

@mlbridge
Copy link

@mlbridge mlbridge bot commented Nov 5, 2021

Webrevs

Copy link

@neliasso neliasso left a comment

Looks good!

@openjdk
Copy link

@openjdk openjdk bot commented Nov 5, 2021

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

8268882: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc

Reviewed-by: neliasso, chagedorn, 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 11 new commits pushed to the master branch:

  • b01f107: 8276252: java/nio/channels/Channels/TransferTo.java failed with OOM java heap space error
  • 92d2176: 8273967: gtest os.dll_address_to_function_and_library_name_vm fails on macOS12
  • a74a839: 8276571: C2: pass compilation options as structure
  • c393ee8: 8276632: Use blessed modifier order in security-libs code
  • 7023b3f: 8276628: Use blessed modifier order in serviceability code
  • b933136: 8276641: Use blessed modifier order in jshell
  • 0616d86: 8276635: Use blessed modifier order in compiler code
  • d95299a: 8276634: Remove usePlainDatagramSocketImpl option from the test DatagramChannel/SendReceiveMaxSize.java
  • 3c0faa7: 8276173: Clean up and remove unneeded casts in HeapDumper
  • 323d201: 8275506: Rename allocated_on_stack to allocated_on_stack_or_embedded
  • ... and 1 more: https://git.openjdk.java.net/jdk/compare/7281861e0662e6c51507066a1f12673a236c7491...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 label Nov 5, 2021
Copy link
Member

@chhagedorn chhagedorn left a comment

Looks good to me, too!

Do you also have a test case for it?

…) failed: No dead instructions after post-alloc
@rickard
Copy link
Author

@rickard rickard commented Nov 9, 2021

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Nov 9, 2021

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

  • d7012fb: 8276880: Remove java/lang/RuntimeTests/exec/ExecWithDir as unnecessary
  • f9024d0: 8230130: javadoc search result dialog shows cut off headers for long results
  • 055de6f: 8223358: Incorrect HTML structure in annotation pages
  • a60e912: 8198626: java/awt/KeyboardFocusmanager/TypeAhead/TestDialogTypeAhead.html fails on mac
  • dde959d: 8276808: java/nio/channels/Channels/TransferTo.java timed out
  • daf77eb: 8276337: Use override specifier in HeapDumper
  • 93692ea: 8274395: Use enhanced-for instead of plain 'for' in jdk.internal.jvmstat
  • e35abe3: 8256208: Javadoc's generated overview does not show classes of unnamed package
  • f65db88: 8276841: Add support for Visual Studio 2022
  • c27afb3: 8276863: Remove test/jdk/sun/security/ec/ECDSAJavaVerify.java
  • ... and 45 more: https://git.openjdk.java.net/jdk/compare/7281861e0662e6c51507066a1f12673a236c7491...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Nov 9, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Nov 9, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Nov 9, 2021

@rickard Pushed as commit 0699220.

💡 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 integrated
4 participants