[clang] [Clang][AMDGPU] Stop defaulting to `one-as` for all atomic scopes (PR #120095)

Jon Chesterfield via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 17 06:54:02 PST 2024


JonChesterfield wrote:

Stringing the pieces together, we may have been conflating opencl-the-language with opencl-the-implementation.

Let's go with the first line of attack, no language special casing here, no checking seq-cst and appending one-as.

Opencl the implementation won't care because it's using the amdgcn builtin anyway (and I think previously just used IR).

Opencl the language doesn't appear to document what the clang builtin is expected to do on it so it seems to me that it can do whatever we see fit. People writing opencl that happen to be using that intrinsic will see a minor performance degradation that they can work around by changing intrinsic.

Simpler compiler, simpler semantics, unbreaks openmp, doesn't require reworking opencl to use the new metadata. I.e. we ship as initially proposed.

@b-sumner is that acceptable?

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


More information about the cfe-commits mailing list