[Mlir-commits] [mlir] [MLIR][omp] Add omp.workshare op (PR #101443)
Tom Eccles
llvmlistbot at llvm.org
Thu Aug 1 02:09:53 PDT 2024
================
@@ -1683,6 +1683,19 @@ LogicalResult SingleOp::verify() {
getCopyprivateSyms());
}
+//===----------------------------------------------------------------------===//
+// WorkshareOp
+//===----------------------------------------------------------------------===//
+
+void WorkshareOp::build(OpBuilder &builder, OperationState &state,
+ const WorkshareOperands &clauses) {
+ WorkshareOp::build(builder, state, clauses.nowait);
+}
+
+LogicalResult WorkshareOp::verify() {
+ return (*this)->getRegion(0).getBlocks().size() == 1 ? success() : failure();
----------------
tblah wrote:
Please could you add an error message if this check fails and a test in `mlir/test/Dialect/OpenMP/invalid.mlir`.
https://github.com/llvm/llvm-project/pull/101443
More information about the Mlir-commits
mailing list