[PATCH] D99757: [flang][OpenMP] Add semantic check for occurrence of constructs nested inside a SIMD region

Arnamoy B via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 5 12:49:14 PDT 2021


arnamoy10 added inline comments.


================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:192
+  if (dirContext_.size() >= 1) {
+    if (FindDirInWholeContext(llvm::omp::simdSet)) {
+      CheckSIMDNest(x);
----------------
kiranchandramohan wrote:
> Nit: Would it be better to keep a counter which counts the constructs in the simdSet? The counter can be incremented on Entering a simdSet construct and decremented on leaving. If counter is greater than 1 then FindDirInWholeContext is true. This way we avoid going through all the  entries in dirContext_ everytime we see a construct.
Thanks for the suggestion.  Updated


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

https://reviews.llvm.org/D99757



More information about the llvm-commits mailing list