RFR: 8361890: Aarch64: Removal of redundant dmb from C1 AtomicLong methods
Samuel Chee
duke at openjdk.org
Thu Jul 10 15:59:51 UTC 2025
The current C1 implementation of AtomicLong methods
which either adds or exchanges (such as getAndAdd)
emit one of a ldaddal and swpal respectively when using
LSE as well as an immediately proceeding dmb. Since
ldaddal/swpal have both acquire and release semantics,
this provides similar ordering guarantees to a dmb.full
so the dmb here is redundant and can be removed.
This is due to both clause 7 and clause 11 of the
definition of Barrier-ordered-before in B2.3.7 of the
DDI0487 L.a Arm Architecture Reference Manual for A-profile
architecture being satisfied by the existence of a
ldaddal/swpal which ensures such memory ordering guarantees.
-------------
Commit messages:
- 8361890: AArch64: Removal of redundant dmb from C1 AtomicLong methods
Changes: https://git.openjdk.org/jdk/pull/26245/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26245&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8361890
Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/26245.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26245/head:pull/26245
PR: https://git.openjdk.org/jdk/pull/26245
More information about the hotspot-compiler-dev
mailing list