[flang-commits] [flang] [flang][OpenACC] Skip non-loop evaluations when descending a collapsed/tiled DO nest (PR #223579)
via flang-commits
flang-commits at lists.llvm.org
Wed Sep 16 05:43:12 PDT 2026
https://github.com/jeanPerier commented:
There was prior work to attach directives to acc.loop: https://github.com/llvm/llvm-project/pull/216769
As far as I understand, the situation it covered applies to directive on the outer loop only, which are always moved before the OpenACC directive in semantic parse tree fix (since https://github.com/llvm/llvm-project/pull/106522).
So you are dealing with the case of inner loop directives that cannot be moved outside of the loop nest since they must stay above the inner loop they affect. In that sense I agree you have to deal with it in lowering, and it is likely OK to ignore them at first, but given https://github.com/llvm/llvm-project/pull/216769, I think it would also be valuable to propagate them on the acc.loop at some point. I am not requesting you to implement this here, I just think it would be useful to underline in the commit or the code that it could be valuable to try to propagate the $DIR info into the acc.loop.
https://github.com/llvm/llvm-project/pull/223579
More information about the flang-commits
mailing list