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

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Mon Oct 14 04:48:07 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()) {
----------------
kiranchandramohan wrote:

If we can write a quick std::find_if for firstprivate that would be great.

Could you also have a quick check/thought about whether the move from the separate callback to body gen callback will hamper the transformations that they talk about in the following presentation? 
https://llvm.org/devmtg/2019-04/slides/TechTalk-Doerfert-Compiler_optimization_for_OpenMP_accelerator_offloading.pdf

FYI. No action required. The folks working on llvm openmp were planning on adding and improving the openmp-opt pass. This would work well if the regions produced by both Clang and Flang are similar.
https://openmp.llvm.org/optimizations/OpenMPOpt.html

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


More information about the flang-commits mailing list