[Mlir-commits] [flang] [mlir] [MLIR][OpenMP] Normalize handling of entry block arguments (PR #109808)

Tom Eccles llvmlistbot at llvm.org
Wed Sep 25 08:56:39 PDT 2024


================
@@ -587,6 +578,15 @@ static void printParallelRegion(OpAsmPrinter &p, Operation *op, Region &region,
                               privateTypes, isByRef, privateSyms);
   }
 
+  if (reductionSyms) {
+    auto *argsBegin = region.front().getArguments().begin();
+    MutableArrayRef argsSubrange(argsBegin + privateVars.size(),
+                                 argsBegin + privateVars.size() +
+                                     reductionTypes.size());
----------------
tblah wrote:

I think we could we use `BlockArgOpenMPOpInterface::getReductionBlockArgs` here to encapsulate the ordering better

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


More information about the Mlir-commits mailing list