[llvm-branch-commits] [flang] [mlir] [mlir][OpenMP] Move taskloop clauses to the context op (PR #188070)
Jack Styles via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Mar 24 03:19:30 PDT 2026
================
@@ -3316,6 +3289,41 @@ LogicalResult TaskloopOp::verify() {
return success();
}
+LogicalResult TaskloopContextOp::verifyRegions() {
+ Region ®ion = getRegion();
+ if (region.empty())
+ return emitOpError() << "expected non-empty region";
+
+ auto count = llvm::count_if(
+ region.front(), [](mlir::Operation &op) { return isa<TaskloopOp>(op); });
+ if (count != 1)
+ return emitOpError()
+ << "expected exactly one TaskloopOp in the region, but " << count
+ << " were found";
+
+ return success();
+}
+
+//===----------------------------------------------------------------------===//
+// TaskloopOp
+//===----------------------------------------------------------------------===//
+
+void TaskloopOp::build(OpBuilder &builder, OperationState &state,
+ const TaskloopOperands &clauses) {
----------------
Stylie777 wrote:
nit: `clauses` is unused here, we should mark it so.
https://github.com/llvm/llvm-project/pull/188070
More information about the llvm-branch-commits
mailing list