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

Sergio Afonso llvmlistbot at llvm.org
Wed Sep 25 09:15:32 PDT 2024


================
@@ -1936,24 +1935,35 @@ static void genStandaloneDistribute(lower::AbstractConverter &converter,
   genDistributeClauses(converter, semaCtx, stmtCtx, item->clauses, loc,
                        distributeClauseOps);
 
-  // TODO: Support delayed privatization.
   DataSharingProcessor dsp(converter, semaCtx, item->clauses, eval,
                            /*shouldCollectPreDeterminedSymbols=*/true,
-                           /*useDelayedPrivatization=*/false, &symTable);
-  dsp.processStep1();
+                           enableDelayedPrivatizationStaging, &symTable);
+  mlir::omp::PrivateClauseOps privateClauseOps;
+  dsp.processStep1(&privateClauseOps);
----------------
skatrak wrote:

I think we can pass `distributeClauseOps` directly to `dsp.processStep1()`. That way we also avoid the need for calling `setPrivateSymsAttr` and appending to `getPrivateVarsMutable` below.

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


More information about the Mlir-commits mailing list