[flang-commits] [flang] [llvm] [mlir] [Flang][OpenMP] Implement DEPEND clause for TASKWAIT directive (PR #193568)

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Thu Jun 18 07:22:02 PDT 2026


================
@@ -4267,10 +4267,14 @@ LogicalResult OrderedRegionOp::verify() { return verifyOrderedParent(**this); }
 
 void TaskwaitOp::build(OpBuilder &builder, OperationState &state,
                        const TaskwaitOperands &clauses) {
-  // TODO Store clauses in op: dependKinds, dependVars, nowait.
-  TaskwaitOp::build(builder, state, /*depend_kinds=*/nullptr,
-                    /*depend_vars=*/{}, /*depend_iterated_kinds=*/nullptr,
-                    /*depend_iterated=*/{}, /*nowait=*/nullptr);
+  // TODO Store clauses in op: depend_iterated_kinds, depend_iterated, nowait.
+  MLIRContext *ctx = builder.getContext();
+  TaskwaitOp::build(builder, state,
+                    /*depend_kinds=*/makeArrayAttr(ctx, clauses.dependKinds),
+                    /*depend_vars=*/clauses.dependVars,
+                    /*depend_iterated_kinds=*/nullptr,
+                    /*depend_iterated=*/{},
+                    /*nowait=*/nullptr);
----------------
tblah wrote:

I think we need to fill all of these out now that we no longer report a TODO for Depend. (There is still one for nowait)

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


More information about the flang-commits mailing list