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

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 21 07:17:30 PST 2023


jhuber6 wrote:

> We're already assigning names to the different scopes; we're just doing it in the `__MEMORY_SCOPE_*` preprocessor macros. Replacing `_MEMORY_SCOPE_SYSTEM` in the code with `"system"` doesn't really change the nature of how we assign names to scopes.
> 
> If these are supposed to match the OpenCL enum values, though, I guess that's an argument for using numbers.

It would be good to be able to provide an easy way to interface with other languages. A lot of this offloading stuff is very common, but was unfortunately tied to OpenCL directly.

Are there any conceptual issues with this patch besides potential naming issues? I'm trying to think of a good catch-all term for all the heirarchies between a device and a single thread but it's difficult.

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


More information about the cfe-commits mailing list