[PATCH] D91159: [flang]Add General Semantic Checks for Allocate Directive

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 11 09:41:41 PST 2020


kiranchandramohan added a comment.

First few comments.



================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:193
 
+void OmpStructureChecker::CheckObjectListStructure(
+    const parser::CharBlock &source, const parser::OmpObjectList &objList) {
----------------
Can you reuse the following function?
void OmpStructureChecker::CheckIsVarPartOfAnotherVar


================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:431-471
-void OmpStructureChecker::Enter(const parser::OmpClause::Priority &x) {
-  CheckAllowed(llvm::omp::Clause::OMPC_priority);
-  RequiresPositiveParameter(llvm::omp::Clause::OMPC_priority, x.v);
-}
-void OmpStructureChecker::Enter(const parser::OmpClause::Private &) {
-  CheckAllowed(llvm::omp::Clause::OMPC_private);
-}
----------------
Why are all these removed in this patch?


================
Comment at: flang/lib/Semantics/resolve-directives.cpp:119
     Walk(std::get<std::list<parser::OpenACCDeclarativeConstruct>>(x.t));
-    return false;
+    return true;
   }
----------------
Why is this change in OpenACC required?


================
Comment at: flang/lib/Semantics/resolve-directives.cpp:353-354
   SymbolSet privateDataSharingAttributeObjects_; // on one directive
+  bool inTarget = false;
+  bool hasAllocator = false;
 
----------------
Is it possible to do the semantic checks without these two globals?
If not this should be initialized with braces.


================
Comment at: flang/test/Semantics/omp-allocate01.f90:25
+end subroutine allocate
\ No newline at end of file

----------------
Check newline in all test files.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91159



More information about the llvm-commits mailing list