This is an archive of the discontinued LLVM Phabricator instance.

[flang][flang-omp-report] Remove the loop workarounds for nowait clause
ClosedPublic

Authored by josh.mottley.arm on Oct 21 2021, 5:27 AM.

Details

Summary

In a "Worksharing-loop construct", one can add a nowait clause at the end
of the loop (i.e. at the loop tail). This clause wasn't associated with
the corresponding loop when originally worked on in flang-omp-report.
Note that this refers to parsing and parse-tree generation. To work
around it, it was needed to track such clauses and the loops.
This should no longer be required (and in fact no longer works) and so
was removed. This results in 'curLoopLogRecord' and 'loopLogRecordStack' and
all references to them being removed. This also allows for
'constructClauses' to be swapped from std::deque to llvm::SmallVector.
Lastly a new test has been added testing the "nowait" clauses in a
variety of ways.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald Transcript
josh.mottley.arm requested review of this revision.Oct 21 2021, 5:27 AM

Manually ran clang-format of flang-omp-report-visistor.cpp as git-clang-format
not correctly formatting the code.

awarzynski accepted this revision.Oct 22 2021, 7:31 AM

Makes sense, thanks for working on this! It's always nice to see a reduction in the number of LOC :) LGTM!

flang/test/Examples/omp-nowait.f90
2

[nit] This comment doesn't add much here. Perhaps just delete?

8

Not true ;-)

This revision is now accepted and ready to land.Oct 22 2021, 7:31 AM

Removed unnecessary comments in 'omp-nowait.f90'.

josh.mottley.arm marked 2 inline comments as done.Oct 26 2021, 6:09 AM