[llvm] [docs] Reflect C++'s read-write and write-read coherence rules in the LLVM memory model (PR #217849)
Fabian Ritter via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 25 05:35:40 PDT 2026
================
@@ -4170,10 +4170,24 @@ happens-before must be perfectly overlapping to act atomically.
read-modify-write operation M ({ref}`cmpxchg <i_cmpxchg>` and
{ref}`atomicrmw <i_atomicrmw>`) reads from a perfectly overlapping
`monotonic` (or stronger) write W, W must be immediately before M in
- the relevant modification order. If one atomic read happens before
- another perfectly overlapping atomic read and both are at least
- `monotonic`, the later read must not see an earlier value in the
- address's modification order. This disallows reordering of perfectly
+ the relevant modification order.
+
+ Atomic accesses that are `monotonic` (or stronger) satisfy coherence rules:
----------------
ritter-x2a wrote:
I've added a point for write-write coherence. I think we shouldn't just state the name "write-write coherence" and that it is implied from something else without saying what "write-write coherence" means, so I gave it a proper self-contained entry in the list.
https://github.com/llvm/llvm-project/pull/217849
More information about the llvm-commits
mailing list