[PATCH] D80689: [MLIR][OpenMP] Defined master operation in OpenMP Dialect
Anchu Rajendran S via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 29 10:23:58 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGdbb5979d158c: [MLIR][OpenMP] Defined master operation in OpenMP Dialect (authored by anchu-rajendran).
Changed prior to commit:
https://reviews.llvm.org/D80689?vs=267116&id=267290#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80689/new/
https://reviews.llvm.org/D80689
Files:
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
mlir/test/Dialect/OpenMP/ops.mlir
Index: mlir/test/Dialect/OpenMP/ops.mlir
===================================================================
--- mlir/test/Dialect/OpenMP/ops.mlir
+++ mlir/test/Dialect/OpenMP/ops.mlir
@@ -6,6 +6,15 @@
return
}
+func @omp_master() -> () {
+ // CHECK: omp.master
+ "omp.master" ()({
+ // CHECK: omp.terminator
+ omp.terminator
+ }):()->()
+ return
+}
+
func @omp_taskwait() -> () {
// CHECK: omp.taskwait
omp.taskwait
@@ -42,7 +51,7 @@
}
func @omp_parallel(%data_var : memref<i32>, %if_cond : i1, %num_threads : si32) -> () {
- // CHECK: omp_parallel
+ // CHECK: omp.parallel
"omp.parallel" (%if_cond, %num_threads, %data_var, %data_var, %data_var, %data_var) ({
// test without if condition
Index: mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
===================================================================
--- mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
+++ mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
@@ -94,7 +94,7 @@
}
def TerminatorOp : OpenMP_Op<"terminator", [Terminator]> {
- let summary = "terminator for OpenMP regions.";
+ let summary = "terminator for OpenMP regions";
let description = [{
A terminator operation for regions that appear in the body of OpenMP
operation. These regions are not expected to return any value so the
@@ -102,8 +102,7 @@
enclosing op.
}];
- let parser = [{ return success(); }];
- let printer = [{ p << getOperationName(); }];
+ let assemblyFormat = "attr-dict";
}
//===----------------------------------------------------------------------===//
@@ -138,6 +137,19 @@
}
//===----------------------------------------------------------------------===//
+// 2.16 master Construct
+//===----------------------------------------------------------------------===//
+def MasterOp : OpenMP_Op<"master"> {
+ let summary = "master construct";
+ let description = [{
+ The master construct specifies a structured block that is executed by
+ the master thread of the team.
+ }];
+
+ let regions = (region AnyRegion:$region);
+}
+
+//===----------------------------------------------------------------------===//
// 2.17.2 barrier Construct
//===----------------------------------------------------------------------===//
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80689.267290.patch
Type: text/x-patch
Size: 2248 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200529/cbb182cf/attachment.bin>
More information about the llvm-commits
mailing list