[Mlir-commits] [mlir] [MLIR][OpenMP] Support basic materialization for `omp.private` ops (PR #81715)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Feb 21 04:17:43 PST 2024


================
@@ -1000,6 +1000,26 @@ convertOmpWsLoop(Operation &opInst, llvm::IRBuilderBase &builder,
   return success();
 }
 
+/// Replace the region arguments of the parallel op (which correspond to private
+/// variables) with the actual private varibles they correspond to. This
+/// prepares the parallel op so that it matches what is expected by the
+/// OMPIRBuilder.
+static void prepareOmpParallelForPrivatization(omp::ParallelOp opInst) {
----------------
NimishMishra wrote:

> Also, what is the disadvantage of the current approach of pre-processing the `omp.parallel` op clone by remapping the block argument uses to the original SSA values that will be privatized?

Thanks for the analysis. I'm okay with the parallel clone op, if there are no alternatives. Let us wait for others to comment though; I am not super confident on this.

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


More information about the Mlir-commits mailing list