llvm-project
eb1b57c6 - [LangRef] Specify that syncscopes can affect the monotonic modification order (#189017)

Commit
1 day ago
[LangRef] Specify that syncscopes can affect the monotonic modification order (#189017) If a target specifies that atomics with mismatching syncscopes appear non-atomic to each other, there is no point in requiring them to be ordered in the monotonic modification order. Notably, the [AMDGPU target user guide](https://llvm.org/docs/AMDGPUUsage.html#memory-scopes) has specified syncscopes to relax the modification order for years. So far, I haven't found an example where this less constrained ordering would be observable (at least with the AMDGPU inclusive scope rules). Whenever a load would be able to see two monotonic stores with non-inclusive scope, that's considered a data race (i.e., the load would return `undef`), so it cannot be used to observe the order of the stores. Related RFC: https://discourse.llvm.org/t/rfc-clarifying-llvm-irs-concurrent-memory-model/90480
Author
Committer
Parents
Loading