[clang] [llvm] [AMDGPU] Add an option to disable unsafe uses of atomic xor (PR #69229)

Pierre-Andre Saulais via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 29 05:13:53 PST 2024


pasaulais wrote:

> > In this case, MMRAs would only help in the sense that you won't need any new attributes and can just add an MMRA such as `atomic-lowering:fine-grained`. It's not really what MMRAs were made for (because this attribute doesn't affect semantics, just lowering style I think?),
> 
> It is semantics. You get undefined behavior if you access fine grained memory for an atomic where the instruction doesn't handle it. I don't think it quite fits into the MMRA box, since it isn't about the synchronization properties of the memory access but where the underlying memory is

@arsenm That makes sense, I don't think MMRA fits the fine-grained use case either. Does that mean we can stick with the approach from this PR? @b-sumner mentioned there was another similar approach being worked on.

https://github.com/llvm/llvm-project/pull/69229


More information about the cfe-commits mailing list