[PATCH] D98256: [flang] Save AllocateObject and PointerObject analyzed expression

Jean Perier via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 9 06:16:22 PST 2021


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

`parser::AllocateObject` and `parser::PointerObject` can be represented
as typed expressions once analyzed. This simplifies the work for parse-tree
consumers that work with typed expressions to deal with allocatable and
pointer objects such as lowering.

Changes:

- Add a `mutable TypedExpr typedExpr` field to `parser::PointerObject` and `parser::AllocateObject`.
- In `semantics::NullifyChecker`, set the `parser::PointerObject` typedExpr after expression analysis.
- In `semantics::DeallocateChecker`, set the `parser::AllocateObject` typedExpr after expression analysis.
- In `semantics::AllocateChecker`, set the `parser::AllocateObject` typedExpr after expression analysis.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98256

Files:
  flang/include/flang/Parser/parse-tree.h
  flang/include/flang/Semantics/expression.h
  flang/lib/Semantics/check-allocate.cpp
  flang/lib/Semantics/check-deallocate.cpp
  flang/lib/Semantics/check-nullify.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98256.329313.patch
Type: text/x-patch
Size: 6230 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210309/e86ac3ce/attachment.bin>


More information about the llvm-commits mailing list