[flang-commits] [PATCH] D94561: [flang] Fix classification of shape inquiries in specification exprs

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue Jan 12 15:41:21 PST 2021


klausler created this revision.
klausler added reviewers: PeteSteinfeld, tskeith, jeanPerier.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
Herald added a reviewer: sscalpone.
klausler requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

  In some contexts, including the motivating case of determining whether
  the expressions that define the shape of a variable are "constant expressions"
  in the sense of the Fortran standard, expression rewriting via Fold()
  is not necessary, and should not be required.  The inquiry intrinsics LBOUND,
  UBOUND, and SIZE work correctly now in specification expressions and are
  classified correctly as being constant expressions (or not).  Getting this right
  led to a fair amount of API clean-up as a consequence, including the
  folding of shapes and TypeAndShape objects, and new APIs for shapes
  that do not fold for those cases where folding isn't needed.  Further,
  the symbol-testing predicate APIs in Evaluate/tools.h now all resolve any
  associations of their symbols and work transparently on use-, host-, and
  construct-association symbols; the tools used to resolve those associations have
  been defined and documented more precisely, and their clients adjusted as needed.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94561

Files:
  flang/include/flang/Evaluate/characteristics.h
  flang/include/flang/Evaluate/fold.h
  flang/include/flang/Evaluate/shape.h
  flang/include/flang/Evaluate/tools.h
  flang/include/flang/Evaluate/type.h
  flang/include/flang/Semantics/tools.h
  flang/lib/Evaluate/characteristics.cpp
  flang/lib/Evaluate/check-expression.cpp
  flang/lib/Evaluate/fold.cpp
  flang/lib/Evaluate/intrinsics.cpp
  flang/lib/Evaluate/shape.cpp
  flang/lib/Evaluate/tools.cpp
  flang/lib/Semantics/check-call.cpp
  flang/lib/Semantics/check-declarations.cpp
  flang/lib/Semantics/check-do-forall.cpp
  flang/lib/Semantics/resolve-names.cpp
  flang/lib/Semantics/semantics.cpp
  flang/lib/Semantics/tools.cpp
  flang/test/Semantics/data04.f90
  flang/test/Semantics/resolve44.f90
  flang/test/Semantics/shape.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94561.316260.patch
Type: text/x-patch
Size: 75246 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210112/d8f8be0f/attachment-0001.bin>


More information about the flang-commits mailing list