[llvm] [OpenMP] Make each atomic helper take an atomic scope argument (PR #122786)

Jan Patrick Lehr via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 08:42:34 PST 2025


================
@@ -28,144 +28,145 @@ enum OrderingTy {
   seq_cst = __ATOMIC_SEQ_CST,
 };
 
-enum ScopeTy {
+enum MemScopeTy {
   system = __MEMORY_SCOPE_SYSTEM,
-  device_ = __MEMORY_SCOPE_DEVICE,
+  device = __MEMORY_SCOPE_DEVICE,
   workgroup = __MEMORY_SCOPE_WRKGRP,
   wavefront = __MEMORY_SCOPE_WVFRNT,
   single = __MEMORY_SCOPE_SINGLE,
 };
 
-enum MemScopeTy {
-  all,    // All threads on all devices
-  device, // All threads on the device
-  cgroup  // All threads in the contention group, e.g. the team
-};
-
 /// Atomically increment \p *Addr and wrap at \p V with \p Ordering semantics.
 uint32_t inc(uint32_t *Addr, uint32_t V, OrderingTy Ordering,
-             MemScopeTy MemScope = MemScopeTy::all);
+             MemScopeTy MemScope = MemScopeTy::device);
----------------
jplehr wrote:

I ran this through some buildbot tests and it seems fine. Don't know about impacts to downstream or so.

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


More information about the llvm-commits mailing list