[Mlir-commits] [mlir] [mlir][OpenMP] inscan reduction modifier and scan op mlir support (PR #114737)

Sergio Afonso llvmlistbot at llvm.org
Fri Dec 6 05:02:42 PST 2024


================
@@ -283,6 +283,40 @@ class OpenMP_DoacrossClauseSkip<
 
 def OpenMP_DoacrossClause : OpenMP_DoacrossClauseSkip<>;
 
+//===----------------------------------------------------------------------===//
+// V5.2: [5.4.7] `exclusive` clause
+//===----------------------------------------------------------------------===//
+
+class OpenMP_ExclusiveClauseSkip<
+    bit traits = false, bit arguments = false, bit assemblyFormat = false,
+    bit description = false, bit extraClassDeclaration = false
+  > : OpenMP_Clause<traits, arguments, assemblyFormat, description,
+                    extraClassDeclaration> {
+  let arguments = (ins
+    Variadic<AnyType>:$exclusive_vars
+  );
+
+  let optAssemblyFormat = [{
+    `exclusive` `(` $exclusive_vars `:` type($exclusive_vars) `)`
+  }];
+
+  let extraClassDeclaration = [{
+    bool hasExclusiveVars() {
+      return getExclusiveVars().size()>0;
+    }
+  }];
+
+  let description = [{
+    The exclusive clause is used on a separating directive that separates a
----------------
skatrak wrote:

Nit: Please slightly update descriptions to actually explicitly mention the use of `{exclusive, inclusive}_vars` arguments, which is the current convention for other clauses and operations.

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


More information about the Mlir-commits mailing list