[Mlir-commits] [mlir] [mlir][OpenMP] add attribute for privatization barrier (PR #140089)

Tom Eccles llvmlistbot at llvm.org
Fri May 16 08:00:22 PDT 2025


================
@@ -1102,7 +1102,10 @@ class OpenMP_PrivateClauseSkip<
 
   let arguments = (ins
     Variadic<AnyType>:$private_vars,
-    OptionalAttr<SymbolRefArrayAttr>:$private_syms
+    OptionalAttr<SymbolRefArrayAttr>:$private_syms,
+    // Set this attribute if a barrier is needed after initialization and
+    // copying of lastprivate variables.
+    UnitAttr:$private_needs_barrier
----------------
tblah wrote:

The members for each clause are all combined into a structure containing elements for all arguments to the operation. Therefore there's a convention to prefix clause data with the name of the clause to avoid name collisions (e.g. if a `needs_barrier` attribute was added to REDUCTION).

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


More information about the Mlir-commits mailing list