[PATCH] D100041: [flang][OpenMP] Add semantic checks for strict nesting inside `teams` construct.

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 23 08:51:47 PDT 2021


kiranchandramohan requested changes to this revision.
kiranchandramohan added a comment.
This revision now requires changes to proceed.

Apologies for the delay. I have a question and a suggestion.



================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:238
+
+  std::visit(Fortran::common::visitors{
+                 [&](const parser::OpenMPBlockConstruct &c) {
----------------
This visit will cause an additional traversal of the subtree rooted at the teams node. Visits to these nodes will be happening anyway during the normal traversal with various Enter and Leave functions.

Would it be possible to do these checks in the following functions? You can add if they don't exist. 

```
void OmpStructureChecker::Enter(const parser::OpenMPBlockConstruct &c)
void OmpStructureChecker::Enter(const parser::OpenMPLoopConstruct &c)
```

Let me know if there is an issue with this approach.


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

https://reviews.llvm.org/D100041



More information about the llvm-commits mailing list