Skip to content

8341831: PhaseCFG::insert_anti_dependences asserts with "no loads" #21455

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

Closed
wants to merge 4 commits into from

Conversation

veresov
Copy link
Contributor

@veresov veresov commented Oct 10, 2024

CacheWB nodes are peculiar in a sense that they both are anti-dependent and produce memory. I think it's reasonable to relax the assert in insert_anti_dependences() to work around their properties.


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-8341831: PhaseCFG::insert_anti_dependences asserts with "no loads" (Bug - P3)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 21455

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 10, 2024

👋 Welcome back iveresov! 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 Oct 10, 2024

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

8341831: PhaseCFG::insert_anti_dependences asserts with "no loads"

Reviewed-by: dlong, 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 25 new commits pushed to the master branch:

  • 2db3397: 8341797: Fix ExceptionOccurred in jdk.jdi
  • c4965d9: 8341794: Fix ExceptionOccurred in jdk.attach
  • 3f53d57: 8340327: A common framework to support public key algorithms with standard parameter sets
  • 0a57fe1: 8341178: TypeRawPtr::add_offset may be "miscompiled" due to UB
  • 1f6bd0c: 8341972: java/awt/dnd/DnDRemoveFocusOwnerCrashTest.java timed out after JDK-8341257
  • 7276a1b: 8341784: Refactor TypeVect to use a BasicType instead of a const Type*
  • 6133866: 8341070: javac fails with an exception when compiling import module under source level 8
  • 519544c: 8341909: G1: Add region index to region printer output
  • 7c0dbf8: 8341820: Check return value of hcreate_r
  • ae41daf: 8341880: RISC-V: riscv_vector.h native build fails with gcc13 after JDK-8320500
  • ... and 15 more: https://git.openjdk.org/jdk/compare/6e0138450ab4b0af917cbf61701b0d1d17eeaa44...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 rfr Pull request is ready for review label Oct 10, 2024
@openjdk
Copy link

openjdk bot commented Oct 10, 2024

@veresov 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 Oct 10, 2024
@mlbridge
Copy link

mlbridge bot commented Oct 10, 2024

Webrevs

@openjdk
Copy link

openjdk bot commented Oct 10, 2024

@veresov Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

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.

Please add comment into code explaining change.

@veresov
Copy link
Contributor Author

veresov commented Oct 10, 2024

Please add comment into code explaining change.

Done.

@vnkozlov
Copy link
Contributor

LoadStore nodes should have the same issue. Why they are not affected?

@veresov
Copy link
Contributor Author

veresov commented Oct 10, 2024

LoadStore nodes should have the same issue. Why they are not affected?

Because LoadStore is an official store. It consumes a memory state and produces memory state. CacheWB is not really a store, that is it doesn't produce memory effects from the perspective of the backend (its match rule is not a Set). It's hard to tell what's the best way to model it, so I just decided not to mess with its semantics right now.

@vnkozlov
Copy link
Contributor

Okay

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 10, 2024
@dean-long
Copy link
Member

LoadStore nodes should have the same issue. Why they are not affected?

Because LoadStore is an official store. It consumes a memory state and produces memory state. CacheWB is not really a store, that is it doesn't produce memory effects from the perspective of the backend (its match rule is not a Set). It's hard to tell what's the best way to model it, so I just decided not to mess with its semantics right now.

Should it be treated like a memory barrier?

@veresov
Copy link
Contributor Author

veresov commented Oct 11, 2024

LoadStore nodes should have the same issue. Why they are not affected?

Because LoadStore is an official store. It consumes a memory state and produces memory state. CacheWB is not really a store, that is it doesn't produce memory effects from the perspective of the backend (its match rule is not a Set). It's hard to tell what's the best way to model it, so I just decided not to mess with its semantics right now.

Should it be treated like a memory barrier?

I'm not sure why it's not, I guess they wanted a more relaxed behavior? It's more like the opposite of prefetch really. I didn't want to touch the semantics of it in this bug fix because it feels like it will likely open another can of worms.

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Oct 11, 2024
@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 11, 2024
@veresov
Copy link
Contributor Author

veresov commented Oct 14, 2024

/integrate

@openjdk
Copy link

openjdk bot commented Oct 14, 2024

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

  • 9e262df: 8342002: sun/security/tools/keytool/GenKeyPairSigner.java failed due to missing certificate output
  • f56a154: 8341881: [REDO] java/nio/file/attribute/BasicFileAttributeView/CreationTime.java#tmp fails on alinux3
  • ba3774d: 8341637: java/net/Socket/UdpSocket.java fails with "java.net.BindException: Address already in use" (macos-aarch64)
  • 1581508: 8335091: NMT: VMATree reserve_mapping and commit_mapping APIs need MEMFLAGS while un/-committing API has no MEMFLAGS arg
  • b20c5c7: 8341967: Unify os::current_file_offset and os::seek_to_file_offset across posix platforms
  • dcac4b0: 8341471: Reversed field layout caused by unstable sorting
  • e3f6503: 8341893: AArch64: Micro-optimize compressed ptr decoding
  • 037f11b: 8341708: Optimize safepoint poll encoding with smaller poll data offset
  • 8d0975a: 8336726: C2: assert(!do_asserts || projs->fallthrough_ioproj != nullptr) failed: must be found
  • fe98f86: 8226938: [TEST_BUG]GTK L&F: There is no Details button in FileChooser Dialog
  • ... and 28 more: https://git.openjdk.org/jdk/compare/6e0138450ab4b0af917cbf61701b0d1d17eeaa44...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Oct 14, 2024

@veresov Pushed as commit a8a8b2d.

💡 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