FLANG
fir::AliasAnalysis::Source::AccessPath Struct Reference

#include <flang/Optimizer/Analysis/AliasAnalysis.h>

Public Member Functions

bool hasPointerDeref () const
 Return true if any step is a PointerDeref.
void print (llvm::raw_ostream &os) const

Public Attributes

llvm::SmallVector< PathStep, 4 > steps
bool isApproximate {false}

Detailed Description

The access path from the root variable to the queried memory location. For example, given: type(outer) :: x ! outer has component "in" of type inner ! inner has pointer component "p" the target address of xinp (i.e. the data xinp points to) is: [{Component,"in"}, {Component,"p"}, {PointerDeref}] where PointerDeref represents loading the pointer descriptor and extracting the target address (fir.load + fir.box_addr in the IR). This enables disambiguation of accesses to different components of the same derived-type variable and tracks pointer dereferences for pointer/target aliasing (Fortran 2018 8.5.7, 15.5.2.13).

Member Data Documentation

◆ isApproximate

bool fir::AliasAnalysis::Source::AccessPath::isApproximate {false}

Whether the path is approximate (e.g. contains array indexing or went through PackArrayOp). An approximate path cannot yield MustAlias.


The documentation for this struct was generated from the following files: