[flang-commits] [flang] [mlir] [flang][OpenMP] Delayed privatization MLIR lowering support for `distribute` (PR #109632)

Sergio Afonso via flang-commits flang-commits at lists.llvm.org
Thu Sep 26 02:51:08 PDT 2024


================
@@ -1859,11 +1863,11 @@ LogicalResult SimdOp::verify() {
 
 void DistributeOp::build(OpBuilder &builder, OperationState &state,
                          const DistributeOperands &clauses) {
-  // TODO Store clauses in op: privateVars, privateSyms.
-  DistributeOp::build(
-      builder, state, clauses.allocateVars, clauses.allocatorVars,
-      clauses.distScheduleStatic, clauses.distScheduleChunkSize, clauses.order,
-      clauses.orderMod, /*private_vars=*/{}, /*private_syms=*/nullptr);
+  DistributeOp::build(builder, state, clauses.allocateVars,
+                      clauses.allocatorVars, clauses.distScheduleStatic,
+                      clauses.distScheduleChunkSize, clauses.order,
+                      clauses.orderMod, clauses.privateVars,
+                      getPrivateSymsAttrIfPresent(builder, clauses));
----------------
skatrak wrote:

I think calling `makeArrayAttr(ctx, clauses.privateSyms)`, as it's done for other builders for operations including the `private` clause, would be better than adding another helper function.

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


More information about the flang-commits mailing list