[PATCH] D89860: [Flang][OpenMP 4.5] Add semantic check for OpenMP ordered and collapse clause

Yashaswini Hegde via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 6 06:26:50 PST 2020


yhegde updated this revision to Diff 303427.
yhegde added a comment.

1. From PrivatizeAssociatedLoopIndex function, the loop level checking code for ordered and collapse clause  is moved to  CheckAssocLoopLevel function.

"Is it possible to pull this out or do it at a different place?"

Since CHECK(level == 0) is removed, the semantic checks can be done in check-omp-structure.cpp. Once again we can go thro the DoConstruct to get the loop level and can have respective checks in OMPC_collapse and OMPC_ordered. Is that what you are suggesting ?!! @kiranchandramohan

2. Clause names are changed to uppercase.

3. "Nit: Can this function return a pair? Question because the name of the function is Get*."

Not done.
It can return a pair of level and OmpClause (probably to avoid Set and GetAssociatedClause,) but to invoke this function from elsewhere, we require OmpClauseList as an input parameter , if my understanding is correct. @kiranchandramohan


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89860/new/

https://reviews.llvm.org/D89860

Files:
  flang/lib/Semantics/resolve-directives.cpp
  flang/test/Semantics/omp-do-collapse-postivecases.f90
  flang/test/Semantics/omp-do-collapse.f90
  flang/test/Semantics/omp-do-ordered-positivecases.f90
  flang/test/Semantics/omp-do-ordered.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89860.303427.patch
Type: text/x-patch
Size: 8868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201106/910c2e01/attachment.bin>


More information about the llvm-commits mailing list