Nicolai Hähnle-Montoro via llvm-dev
2019-Jun-13 15:13 UTC
[llvm-dev] Memory model: clarifying the semantics of unordered atomic loads & stores
Hi all, There is a seeming contradiction, or possibly just an oversight, in some of the language defining atomics and fences in relation to the unordered ordering in LangRef.rst and Atomics.rst. This has come up in discussions related to the memory model in Vulkan. Atomics.rst says about unorderd: "This cannot be used for synchronization" However, the semantics of fence instructions in LangRef.rst talks about fences A, B and related atomic operations X, Y establishing a happens-before relation between A and B. We suspect that the intention here is that X and Y both must have at least a _monotonic_ ordering. Is that correct? Thanks, Nicolai -- Lerne, wie die Welt wirklich ist, aber vergiss niemals, wie sie sein sollte.