[clang] [Clang] Introduce scoped variants of GNU atomic functions (PR #72280)

Jon Chesterfield via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 1 13:07:17 PST 2023


JonChesterfield wrote:

The capability is more important than the naming. `__llvm_atomic_scoped_load` would be fine, with string literals or enum or macro controlling the scope. I also don't mind if it's a scoped argument or if we end up with `__llvm_atomic_seqcst_device_load`, embedding all of it in the symbol name. Clang can't currently instantiate IR atomics with scopes and it would be useful to do so.

If GCC picks a different set of names - maybe they go with defines for scope and we go with strings, and the names differ - we get to pick between renaming ours, adding aliases, ignoring the divergence.

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


More information about the cfe-commits mailing list