[flang-commits] [flang] [mlir] [flang][OpenMP] Fix reduction init region block management (PR #122079)

Kareem Ergawy via flang-commits flang-commits at lists.llvm.org
Wed Jan 8 03:14:30 PST 2025


================
@@ -1039,9 +1039,6 @@ initReductionVars(OP op, ArrayRef<BlockArgument> reductionArgs,
   if (op.getNumReductionVars() == 0)
     return success();
 
-  llvm::IRBuilderBase::InsertPointGuard guard(builder);
-
-  builder.SetInsertPoint(latestAllocaBlock->getTerminator());
----------------
ergawy wrote:

Added some docs to explain the pre- and post-conditions of the functions. Let me know if something needs to be clarified further.

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


More information about the flang-commits mailing list