[flang-commits] [flang] [Flang][OpenMP] Process reduction only once for parallel do (PR #70844)
Sergio Afonso via flang-commits
flang-commits at lists.llvm.org
Wed Nov 8 09:01:22 PST 2023
https://github.com/skatrak approved this pull request.
LGTM. Thank you for catching this, I didn't realize there were exceptions in the standard as to which leaf constructs in a combined construct should get the `reduction` clause applied to. It says the following (v5.2, Sect. 17.2):
> The effect of the reduction clause is as if it is applied to all leaf constructs that permit the clause, except for the following constructs:
> - The parallel construct, when combined with the sections, worksharing-loop, loop, or taskloop construct [...]
So I guess we can later refine the check a bit to only avoid processing the `reduction` clause in these specific cases. But for now I think this is good enough.
https://github.com/llvm/llvm-project/pull/70844
More information about the flang-commits
mailing list