[Mlir-commits] [flang] [mlir] [Flang][MLIR][OpenMP] - Add support for firstprivate when translating omp.target ops from MLIR to LLVMIR (PR #131213)

Kareem Ergawy llvmlistbot at llvm.org
Thu Mar 13 22:03:56 PDT 2025


================
@@ -1666,13 +1666,19 @@ static void genTargetClauses(
   cp.processNowait(clauseOps);
   cp.processThreadLimit(stmtCtx, clauseOps);
 
-  cp.processTODO<clause::Allocate, clause::Defaultmap, clause::Firstprivate,
-                 clause::InReduction, clause::UsesAllocators>(
-      loc, llvm::omp::Directive::OMPD_target);
+  cp.processTODO<clause::Allocate, clause::Defaultmap, clause::InReduction,
+                 clause::UsesAllocators>(loc,
+                                         llvm::omp::Directive::OMPD_target);
 
   // `target private(..)` is only supported in delayed privatization mode.
   if (!enableDelayedPrivatizationStaging)
     cp.processTODO<clause::Private>(loc, llvm::omp::Directive::OMPD_target);
----------------
ergawy wrote:

Until we flip the switch and enable delayed privatization for target by default, we need to list `firstprivate` here otherwise we will enable it accidently while disabling `private`.

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


More information about the Mlir-commits mailing list