[flang-commits] [flang] [Flang][OpenMP] Create MLIR optimization pass to push index allocations into loop body and remove them if redundant (PR #67010)
Kiran Chandramohan via flang-commits
flang-commits at lists.llvm.org
Fri Sep 22 07:27:53 PDT 2023
kiranchandramohan wrote:
The other option is to delay materializing this loop index variable till LLVM code generation. You can have another entry block argument that is a reference. In the IR we will store the loop index to the reference. While generating LLVM code, we can materialize this to an llvm alloca wherever we want.
```
omp.wslop %i = %start to %end {
bb0 (%i, %i_ref):
fir.store %i to %i_ref
}
```
https://github.com/llvm/llvm-project/pull/67010
More information about the flang-commits
mailing list