[Mlir-commits] [mlir] Adding masked operation to OpenMP Dialect (PR #96022)

Sergio Afonso llvmlistbot at llvm.org
Wed Jul 3 05:01:54 PDT 2024


================
@@ -1577,4 +1577,23 @@ def DeclareReductionOp : OpenMP_Op<"declare_reduction", [IsolatedFromAbove,
   let hasRegionVerifier = 1;
 }
 
+//===----------------------------------------------------------------------===//
+// [Spec 5.2] 10.5 masked Construct
+//===----------------------------------------------------------------------===//
+def MaskedOp : OpenMP_Op<"masked", clauses = [
+    OpenMP_FilterClause
+  ], singleRegion = 1> {
+  let summary = "masked construct";
+  let description = [{
+    Masked construct allows to specify a structured block to be executed by a subset of 
+    threads of the current team.
+  }] # clausesDescription;
+
+  let regions = (region AnyRegion:$region);
----------------
skatrak wrote:

You can remove this definition, since the `singleRegion = 1` parameter already results in this region being defined by default.

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


More information about the Mlir-commits mailing list