[PATCH] D84768: [flang][NFC] Extract name resolution for OpenACC & OpenMP into new file

Tim Keith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 28 10:14:47 PDT 2020


tskeith created this revision.
tskeith added reviewers: klausler, PeteSteinfeld, ichoyjx, clementval.
tskeith added a project: Flang.
Herald added subscribers: llvm-commits, aaron.ballman, guansong, yaxunl, mgorny.
Herald added a reviewer: jdoerfert.
Herald added a reviewer: DavidTruby.
Herald added a reviewer: sscalpone.
Herald added a project: LLVM.
tskeith requested review of this revision.
Herald added a subscriber: sstefan1.

Move `ResolveAccParts` and `ResolveOmpParts` from resolve-names.cpp to
resolve-directives.{h,cpp}. Move the implementation in the classes
`DirectiveAttributeVisitor`, `AccAttributeVisitor`, and
`OmpAttributeVisitor` to resolve-directives.cpp as well.

To allow this to happen, move `EvaluateIntExpr` and introduce
`EvaluateInt64` to resolve-names-utils.h. The latter is also useful
elsewhere in resolve-names.cpp for converting an Expr to std::int64_t.

The other problem was that `ResolveDesignator` was called from the code
that was moved. At the moment it doesn't seem to be doing anything so I
removed the calls (and no tests failed). If it proves to be needed, we
can either resolve those designators in resolve-names.cpp or pass the
`ResolveDesignator` function in to the code that needs to call it.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D84768

Files:
  flang/lib/Semantics/CMakeLists.txt
  flang/lib/Semantics/resolve-directives.cpp
  flang/lib/Semantics/resolve-directives.h
  flang/lib/Semantics/resolve-names-utils.h
  flang/lib/Semantics/resolve-names.cpp
  flang/test/Semantics/acc-resolve01.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84768.281276.patch
Type: text/x-patch
Size: 83182 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200728/303ce176/attachment-0001.bin>


More information about the llvm-commits mailing list