[flang-commits] [flang] [mlir] [flang][OpenMP] Allow saving first block of an OMP region for allocas (PR #121886)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Tue Jan 7 02:20:46 PST 2025
https://github.com/tblah commented:
Thanks for working on a fix for this. I have had a lot of trouble before getting the insertion points right for reductions.
> Now, when we choose an alloca insertion point for the reduction, this is the chosen block omp.par.entry (without the changes in this PR). The problem is that the allocation needed for the reduction needs to reference the %5 SSA value. This results in inserting allocations in omp.par.entry that reference allocations in a later block omp.par.region1 which causes the Instruction does not dominate all uses! error.
Do you mean that the allocation *region* of the reduction needs to reference `%5`? Shouldn't that be the `init` region (which definately shouldn't be in the alloca block)?
https://github.com/llvm/llvm-project/pull/121886
More information about the flang-commits
mailing list