[PATCH] D106335: [flang][OpenMP] Add semantic check for teams nesting

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 28 13:15:57 PDT 2021


kiranchandramohan added a comment.

Looks OK. Have two questions.



================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:632
+        GetContextParent().directive != llvm::omp::Directive::OMPD_target &&
+        GetContextParent().directive != llvm::omp::Directive::OMPD_teams) {
+      context_.Say(parser::FindSourceLocation(x),
----------------
Is the parent teams check required?


================
Comment at: flang/lib/Semantics/check-omp-structure.h:255
+  int directiveNest_[2] = {0};
+  enum directiveNestType { SIMDNest, TargetBlockOnlyTeams };
 };
----------------
Nit: Can we add a LastType at the end of the enum and use it as the size of the directiveNest_ array?


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

https://reviews.llvm.org/D106335



More information about the llvm-commits mailing list