|
FLANG
|
#include <flang/Lower/PFTBuilder.h>
Classes | |
| struct | AggregateStore |
| struct | Nominal |
Public Types | |
| using | Interval = std::tuple<std::size_t, std::size_t> |
| <offset, size> pair | |
Public Member Functions | |
| Variable (const Fortran::semantics::Symbol &sym, bool global=false, int depth=0) | |
| Variable (AggregateStore &&istore) | |
| const Fortran::semantics::Symbol & | getSymbol () const |
| Return the front-end symbol for a nominal variable. | |
| bool | isRuntimeTypeInfoData () const |
| Is this variable a compiler generated global to describe derived types? | |
| const AggregateStore & | getAggregateStore () const |
| Return the aggregate store. | |
| const Interval & | getInterval () const |
| Return the interval range of an aggregate store. | |
| bool | hasSymbol () const |
| Only nominal variable have front-end symbols. | |
| bool | isAggregateStore () const |
| Is this an aggregate store? | |
| bool | isGlobal () const |
| Is this variable a global? | |
| bool | isModuleOrSubmoduleVariable () const |
| Is this a module or submodule variable? | |
| const Fortran::semantics::Scope * | getOwningScope () const |
| bool | isHeapAlloc () const |
| bool | isPointer () const |
| bool | isTarget () const |
| bool | isAlias () const |
| std::size_t | getAliasOffset () const |
| void | setAlias (std::size_t offset) |
| void | setHeapAlloc (bool to=true) |
| void | setPointer (bool to=true) |
| void | setTarget (bool to=true) |
| int | getDepth () const |
| The depth is recorded for nominal variables as a debugging aid. | |
| LLVM_DUMP_METHOD void | dump () const |
A variable captures an object to be created per the declaration part of a function like unit.
Fortran EQUIVALENCE statements are a mechanism that introduces aliasing between named variables. The set of overlapping aliases will materialize a generic store object with a designated offset and size. Participant symbols will simply be pointers into the aggregate store.
EQUIVALENCE can also interact with COMMON and other global variables to imply aliasing between (subparts of) a global and other local variable names.
Properties can be applied by lowering. For example, a local array that is known to be very large may be transformed into a heap allocated entity by lowering. That decision would be tracked in its Variable instance.
|
inline |
An alias(er) is a variable that is part of a EQUIVALENCE that is allocated locally on the stack.