FLANG
fir::AliasAnalysis Struct Reference

Classes

struct  Source

Public Member Functions

 ENUM_CLASS (SourceKind, Allocate, Global, Argument, HostAssoc, Indirect, Unknown)
 Kind of the memory source referenced by a value.
 ENUM_CLASS (Attribute, Target, Pointer, IntentIn, CrayPointer, CrayPointee)
 Attributes of the memory source object.
mlir::AliasResult alias (Source lhsSrc, Source rhsSrc, mlir::Value lhs, mlir::Value rhs)
 Given the values and their sources, return their aliasing behavior.
mlir::AliasResult alias (mlir::Value lhs, mlir::Value rhs)
 Given two values, return their aliasing behavior.
mlir::ModRefResult getModRef (mlir::Operation *op, mlir::Value location)
 Return the modify-reference behavior of op on location.
mlir::ModRefResult getModRef (mlir::Region &region, mlir::Value location)
fir::AliasAnalysis::Source getSource (mlir::Value, bool getLastInstantiationPoint=false, bool collectScopedOrigins=true)
bool functionHasMultipleScopes (mlir::Value v)

Static Public Member Functions

static bool isPointerReference (mlir::Type ty)

Friends

llvm::raw_ostream & operator<< (llvm::raw_ostream &os, const AliasAnalysis::Source &op)

Member Function Documentation

◆ functionHasMultipleScopes()

bool fir::AliasAnalysis::functionHasMultipleScopes ( mlir::Value v)

Return true if the function containing v has more than one fir.dummy_scope op (e.g. the function body has been inlined into). Scope-aware disambiguation in alias(lhs, rhs) is only meaningful in that case; skipping it for functions with just one scope avoids the getDeclarationScope/DominanceInfo overhead in getSource. Both true and false results are cached in multiScopeCache so the function walk is paid at most once per funcOp per AliasAnalysis instance.

◆ getModRef()

ModRefResult fir::AliasAnalysis::getModRef ( mlir::Region & region,
mlir::Value location )

Return the modify-reference behavior of operations inside region on location. Contrary to getModRef(operation, location), this will visit nested regions recursively according to the HasRecursiveMemoryEffects trait.

◆ getSource()

AliasAnalysis::Source fir::AliasAnalysis::getSource ( mlir::Value v,
bool getLastInstantiationPoint = false,
bool collectScopedOrigins = true )

Return the memory source of a value. If getLastInstantiationPoint is true, the search for the source will stop at [hl]fir.declare if it represents a dummy argument declaration (i.e. it has the dummy_scope operand). If collectScopedOrigins is false, the per-declare ScopedOrigin snapshots are not collected, and getSource performs only the SourceKind/origin classification without that bookkeeping side effect.

◆ isPointerReference()

bool fir::AliasAnalysis::isPointerReference ( mlir::Type ty)
static

Return true, if ty is a reference type to a boxed POINTER object or a raw fir::PointerType.


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