JDK-8343541 : C1: Plain memory accesses are emitted with membars with +AlwaysAtomicAccesses
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17,21,23,24
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-11-04
  • Updated: 2024-11-27
  • Resolved: 2024-11-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 24
24 b25Fixed
Related Reports
Relates :  
Description
Noticed this while looking at current AlwaysAtomicAccesses uses. This flag is useful to experiment with Valhalla flattening and generically with long atomicity.

See for example here: https://github.com/openjdk/jdk/blob/895a7b64f01dec7248549b127875edcf006457cf/src/hotspot/share/gc/shared/c1/barrierSetC1.cpp#L143 -- we set `is_volatile` when `+AlwaysAtomicAccesses`, so it emit barriers.
Comments
Changeset: afee7405 Branch: master Author: Xiaolong Peng <xpeng@openjdk.org> Committer: Aleksey Shipilev <shade@openjdk.org> Date: 2024-11-20 10:34:07 +0000 URL: https://git.openjdk.org/jdk/commit/afee7405bd13cbe1cb829dd150a9de7e6faf49ae
20-11-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/22191 Date: 2024-11-18 07:27:03 +0000
18-11-2024