[PATCH] D78680: [flang] Compute sizes and offsets for symbols

Tim Keith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 22 15:48:32 PDT 2020


tskeith created this revision.
Herald added subscribers: llvm-commits, mgrang, mgorny.
Herald added a reviewer: DavidTruby.
Herald added a reviewer: sscalpone.
Herald added a project: LLVM.
tskeith retitled this revision from "Compute sizes and offsets for symbols" to "[flang] Compute sizes and offsets for symbols".
tskeith added reviewers: klausler, PeteSteinfeld.
tskeith added a project: Flang.
Herald added a reviewer: jdoerfert.

Add size and offset properties to symbols, representing their byte size
and offset within their enclosing scope.

Add size and align properties to scopes so that they are available for
scopes representing derived types.

Add ComputeOffsets pass over the symbol table to fill in those fields.

Compute descriptor size based on rank and length parameters. Extract
DerivedTypeSpec::NumLengthParameters from DynamicType::RequiresDescriptor
to share the code.

Add symbol size and offset to output of `-fdebug-dump-symbols` and use
that in some tests.

Still to do:

- make size and alignment rules configurable based on target
- use offsets to check EQUIVALENCE statements


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78680

Files:
  flang/include/flang/Semantics/scope.h
  flang/include/flang/Semantics/symbol.h
  flang/include/flang/Semantics/type.h
  flang/lib/Evaluate/type.cpp
  flang/lib/Semantics/CMakeLists.txt
  flang/lib/Semantics/compute-offsets.cpp
  flang/lib/Semantics/compute-offsets.h
  flang/lib/Semantics/scope.cpp
  flang/lib/Semantics/semantics.cpp
  flang/lib/Semantics/symbol.cpp
  flang/lib/Semantics/type.cpp
  flang/test/Semantics/offsets01.f90
  flang/test/Semantics/offsets02.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78680.259416.patch
Type: text/x-patch
Size: 16909 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200422/2cf541a3/attachment.bin>


More information about the llvm-commits mailing list