[flang-commits] [flang] [flang][OpenMP] Handle `omp.private` in `FirOpBuilder::getAllocaBlock()` (PR #93927)

Valentin Clement バレンタイン クレメン via flang-commits flang-commits at lists.llvm.org
Fri May 31 08:18:47 PDT 2024


================
@@ -252,7 +252,8 @@ mlir::Block *fir::FirOpBuilder::getAllocaBlock() {
               .getParentOfType<mlir::omp::OutlineableOpenMPOpInterface>()) {
     return ompOutlineableIface.getAllocaBlock();
   }
-  if (getRegion().getParentOfType<mlir::omp::DeclareReductionOp>())
+  if (getRegion().getParentOfType<mlir::omp::DeclareReductionOp>() ||
+      getRegion().getParentOfType<mlir::omp::PrivateClauseOp>())
----------------
clementval wrote:

adding a common interface to these kind of ops would be much cleaner and future proof.

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


More information about the flang-commits mailing list