[Mlir-commits] [mlir] [OpenACC][MLIR] clone private operands during ACCIfClauseLowering (PR #177458)

Scott Manley llvmlistbot at llvm.org
Thu Jan 22 17:56:41 PST 2026


================
@@ -178,20 +183,26 @@ void ACCIfClauseLowering::lowerIfClauseForComputeConstruct(
   // Clone data entry operations
   SmallVector<Value> deviceDataOperands;
   SmallVector<Value> firstprivateOperands;
+  SmallVector<Value> privateOperands;
   SmallVector<Value> reductionOperands;
 
   // Map the data entry and firstprivate ops for the cloned region
   IRMapping deviceMapping;
   for (Operation *dataOp : dataEntryOps) {
-    Operation *clonedDataOp = rewriter.clone(*dataOp, deviceMapping);
-    deviceDataOperands.push_back(clonedDataOp->getResult(0));
-    deviceMapping.map(dataOp->getResult(0), clonedDataOp->getResult(0));
+    Operation *clonedOp = rewriter.clone(*dataOp, deviceMapping);
----------------
rscottmanley wrote:

Good suggestion!

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


More information about the Mlir-commits mailing list