[Mlir-commits] [flang] [mlir] [mlir][OpenMP] rewrite conversion of privatisation for omp.parallel (PR #111844)

Tom Eccles llvmlistbot at llvm.org
Mon Oct 14 02:11:06 PDT 2024


================
@@ -1421,12 +1450,57 @@ convertOmpParallel(omp::ParallelOp opInst, llvm::IRBuilderBase &builder,
             deferredStores, isByRef)))
       bodyGenStatus = failure();
 
+    // Apply copy region for firstprivate.
+    if (!privateBlockArgs.empty()) {
----------------
tblah wrote:

I'm only checking that there are private arguments not if any are firstprivate because it felt like overkill to scan every argument looking for a firstprivate one. Would you prefer I did that?

I don't want to always create the blocks because that would lead to unnecessary test churn, especially if they were in OpenMPIRBuilder as that may effect clang too.

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


More information about the Mlir-commits mailing list