MLIR
20.0.0git
|
This class represents the main alias analysis interface in MLIR. More...
#include "mlir/Analysis/AliasAnalysis.h"
Public Member Functions | |
AliasAnalysis (Operation *op) | |
template<typename AnalysisT > | |
void | addAnalysisImplementation (AnalysisT &&analysis) |
Add a new alias analysis implementation AnalysisT to this analysis aggregate. More... | |
AliasResult | alias (Value lhs, Value rhs) |
Given two values, return their aliasing behavior. More... | |
ModRefResult | getModRef (Operation *op, Value location) |
Return the modify-reference behavior of op on location . More... | |
This class represents the main alias analysis interface in MLIR.
It functions as an aggregate of various different alias analysis implementations. This aggregation allows for utilizing the strengths of different alias analysis implementations that either target or have access to different aliasing information. This is especially important for MLIR given the scope of different types of memory models and aliasing behaviors. For users of this analysis that want to perform aliasing queries, see the Alias Queries
section below for the available methods. For users of this analysis that want to add a new alias analysis implementation to the aggregate, see the Alias Implementations
section below.
Definition at line 232 of file AliasAnalysis.h.
AliasAnalysis::AliasAnalysis | ( | Operation * | op | ) |
Definition at line 76 of file AliasAnalysis.cpp.
|
inline |
Add a new alias analysis implementation AnalysisT
to this analysis aggregate.
This allows for users to access this implementation when performing alias queries. Implementations added here must provide the following:
AliasResult
that corresponds to the aliasing behavior between lhs
and rhs
. The conservative "I don't
know" result of this method should be MayAlias.ModRefResult
that corresponds to the modify-reference behavior of op
on the given location
. The conservative "I don't know" result of this method should be ModRef. Definition at line 258 of file AliasAnalysis.h.
AliasResult AliasAnalysis::alias | ( | Value | lhs, |
Value | rhs | ||
) |
Given two values, return their aliasing behavior.
Definition at line 80 of file AliasAnalysis.cpp.
References mlir::AliasResult::isMay(), and mlir::AliasResult::MayAlias.
Referenced by mlir::affine::affineScalarReplace().
ModRefResult AliasAnalysis::getModRef | ( | Operation * | op, |
Value | location | ||
) |
Return the modify-reference behavior of op
on location
.
Definition at line 90 of file AliasAnalysis.cpp.