[PATCH] D99970: [flang][OpenMP] Add functionality to check "close nesting" of regions, which can be used for Semantic checks.
Kiran Chandramohan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 6 11:09:52 PDT 2021
kiranchandramohan added inline comments.
================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:130
+bool OmpStructureChecker::IsCloselyNested(const OmpDirectiveSet &set) {
+ // Definition of close nesting:
----------------
I was thinking you will be doing the following. Is there an issue with this approach?
1) curIndex = index of top of stack
2) curDir = Directive at curIndex
3) If (curDir is a violating nesting) return true
4) if (curDir is parallel) return false
5) if curIndex == -1 return false
6) curIndex = curIndex - 1
7) goto step 2
================
Comment at: flang/lib/Semantics/check-omp-structure.h:169
const parser::CharBlock &, const OmpDirectiveSet &);
-
+ bool IsCloselyNested(const OmpDirectiveSet &set);
// specific clause related
----------------
Can you change the name to IsCloselyNestedRegion.
Note that the definition of closely nested construct is different. A construct nested inside another construct with no other construct nested between them.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99970/new/
https://reviews.llvm.org/D99970
More information about the llvm-commits
mailing list