[Mlir-commits] [mlir] [mlir][OpenMP] inscan reduction modifier and scan op mlir support (PR #114737)
Anchu Rajendran S
llvmlistbot at llvm.org
Wed Jan 15 11:26:17 PST 2025
anchuraj wrote:
I have removed the check to compare `scanVars` and `reductionBlockArgs` as mlir phase inserts a new copy of private argument inside the loop body and that is the value used in `scanVars` (as shown in the below code snippet). This check is performed in the semantic phase in `flang` ensuring that there will not be any errors from the input code.
```
omp.wsloop reduction(mod: inscan, @add_reduction_i32 %11 -> %arg0 : !fir.ref<i32>) {
omp.loop_nest (%arg1) : i32 = (%c1_i32) to (%c100_i32) inclusive step (%c1_i32) {
%45 = fir.declare %arg0 {uniq_name = "_QFEx"} : (!fir.ref<i32>) -> !fir.ref<i32>
...
omp.scan inclusive(%45 : !fir.ref<i32>)
...
```
https://github.com/llvm/llvm-project/pull/114737
More information about the Mlir-commits
mailing list