[Mlir-commits] [mlir] [mlir][OpenMP] Fix update of linear iteration variables (PR #183800)

Leandro Lupori llvmlistbot at llvm.org
Tue Aug 4 06:52:03 PDT 2026


luporl wrote:

> > Is there an immediate need to get it in right away or get to a more holistic fix of the general `lastprivate` vs `private` vs. `linear` issue that exists in Flang today?
> 
> There is no need to get this in right away, but as it stands, it fixes the update of linear iteration variables and #170784, while not making it harder to fix the general `lastprivate` vs `private` vs. `linear` issue, AFAIK. But I'll try to draft a fix for that.

@mjklemm, I tried to fix the issue above by changing iteration variable DSAs to `private` in semantics, in `do simd` directives: #213947.
But it didn't work as expected when `linear`/`lastprivate` is explicitly specified.

It seems like the correct fix would have to be done in lowering, by keeping iteration variables in `omp.simd` as `linear`/`lastprivate` and making them `private` in `omp.wsloop`.

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


More information about the Mlir-commits mailing list