[PATCH] D90210: [flang] [OpenMP 4.5] Add semantic checks for OpenMP Private clause

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 30 06:08:31 PST 2020


kiranchandramohan accepted this revision.
kiranchandramohan added a comment.
This revision is now accepted and ready to land.

LGTM. Thanks @praveen.



================
Comment at: flang/lib/Semantics/resolve-directives.cpp:1213-1217
+  // Identify all the namelist objects
+  GetNamelistSymbols(namelistSymbols, currScope().parent());
+  if (ultimateScope.IsModule()) {
+    GetNamelistSymbols(namelistSymbols, ultimateScope);
+  }
----------------
tskeith wrote:
> kiranchandramohan wrote:
> > kiranchandramohan wrote:
> > > Calling GetNamelistSymbols for finding all the namelist objects each time CheckObjectInNameList (for each variable in the private list) is called seems to be not optimal.
> > > 
> > > @tskeith Is there a better way to check whether a variable is part of a namelist?
> > I checked with others,  what Peter suggested is to collect all the namelist groups' symbols once and then use it for the private clause checks. Can you try that?
> Another option would be to add an `InNamelist` flag to Symbol::Flags, similar to `InDataStmt`. It's probably easy to set that in `resolve-names.cpp`.
Thanks @tskeith 


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

https://reviews.llvm.org/D90210



More information about the llvm-commits mailing list