================
@@ -3316,6 +3289,41 @@ LogicalResult TaskloopOp::verify() {
   return success();
 }
 
+LogicalResult TaskloopContextOp::verifyRegions() {
+  Region &region = 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
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to