|
MLIR 22.0.0git
|
Strided metadata range analysis determines the strided metadata ranges of SSA values using operations that define InferStridedMetadataInterface. More...
#include "mlir/Analysis/DataFlow/StridedMetadataRangeAnalysis.h"
Public Member Functions | |
| StridedMetadataRangeAnalysis (DataFlowSolver &solver, int32_t indexBitwidth=64) | |
| void | setToEntryState (StridedMetadataRangeLattice *lattice) override |
| At an entry point, we cannot reason about strided metadata ranges unless the type also encodes the data. | |
| LogicalResult | visitOperation (Operation *op, ArrayRef< const StridedMetadataRangeLattice * > operands, ArrayRef< StridedMetadataRangeLattice * > results) override |
| Visit an operation. | |
| Public Member Functions inherited from mlir::dataflow::SparseForwardDataFlowAnalysis< StridedMetadataRangeLattice > | |
| SparseForwardDataFlowAnalysis (DataFlowSolver &solver) | |
| virtual void | visitExternalCall (CallOpInterface call, ArrayRef< const StridedMetadataRangeLattice * > argumentLattices, ArrayRef< StridedMetadataRangeLattice * > resultLattices) |
| Visit a call operation to an externally defined function given the lattices of its arguments. | |
| virtual void | visitNonControlFlowArguments (Operation *op, const RegionSuccessor &successor, ArrayRef< StridedMetadataRangeLattice * > argLattices, unsigned firstIndex) |
| Given an operation with possible region control-flow, the lattices of the operands, and a region successor, compute the lattice values for block arguments that are not accounted for by the branching control flow (ex. | |
| Public Member Functions inherited from mlir::dataflow::AbstractSparseForwardDataFlowAnalysis | |
| LogicalResult | initialize (Operation *top) override |
| Initialize the analysis by visiting every owner of an SSA value: all operations and blocks. | |
| LogicalResult | visit (ProgramPoint *point) override |
| Visit a program point. | |
| Public Member Functions inherited from mlir::DataFlowAnalysis | |
| virtual | ~DataFlowAnalysis () |
| DataFlowAnalysis (DataFlowSolver &solver) | |
| Create an analysis with a reference to the parent solver. | |
| virtual void | initializeEquivalentLatticeAnchor (Operation *top) |
| Initialize lattice anchor equivalence class from the provided top-level operation. | |
Additional Inherited Members | |
| Protected Member Functions inherited from mlir::dataflow::SparseForwardDataFlowAnalysis< StridedMetadataRangeLattice > | |
| StridedMetadataRangeLattice * | getLatticeElement (Value value) override |
| Get the lattice element for a value. | |
| const StridedMetadataRangeLattice * | getLatticeElementFor (ProgramPoint *point, Value value) |
| Get the lattice element for a value and create a dependency on the provided program point. | |
| void | setAllToEntryStates (ArrayRef< StridedMetadataRangeLattice * > lattices) |
| Protected Member Functions inherited from mlir::dataflow::AbstractSparseForwardDataFlowAnalysis | |
| AbstractSparseForwardDataFlowAnalysis (DataFlowSolver &solver) | |
| const AbstractSparseLattice * | getLatticeElementFor (ProgramPoint *point, Value value) |
| Get a read-only lattice element for a value and add it as a dependency to a program point. | |
| virtual void | setToEntryState (AbstractSparseLattice *lattice)=0 |
| Set the given lattice element(s) at control flow entry point(s). | |
| void | setAllToEntryStates (ArrayRef< AbstractSparseLattice * > lattices) |
| void | join (AbstractSparseLattice *lhs, const AbstractSparseLattice &rhs) |
| Join the lattice element and propagate and update if it changed. | |
| virtual LogicalResult | visitCallOperation (CallOpInterface call, ArrayRef< const AbstractSparseLattice * > operandLattices, ArrayRef< AbstractSparseLattice * > resultLattices) |
| Visits a call operation. | |
| virtual void | visitCallableOperation (CallableOpInterface callable, ArrayRef< AbstractSparseLattice * > argLattices) |
| Visits a callable operation. | |
| Protected Member Functions inherited from mlir::DataFlowAnalysis | |
| void | addDependency (AnalysisState *state, ProgramPoint *point) |
| Create a dependency between the given analysis state and lattice anchor on this analysis. | |
| void | propagateIfChanged (AnalysisState *state, ChangeResult changed) |
| Propagate an update to a state if it changed. | |
| template<typename AnchorT> | |
| void | registerAnchorKind () |
| Register a custom lattice anchor class. | |
| template<typename AnchorT, typename... Args> | |
| AnchorT * | getLatticeAnchor (Args &&...args) |
| Get or create a custom lattice anchor. | |
| template<typename StateT, typename AnchorT> | |
| void | unionLatticeAnchors (AnchorT anchor, AnchorT other) |
| Union input anchors under the given state. | |
| template<typename StateT, typename AnchorT> | |
| StateT * | getOrCreate (AnchorT anchor) |
| Get the analysis state associated with the lattice anchor. | |
| template<typename StateT, typename AnchorT> | |
| const StateT * | getOrCreateFor (ProgramPoint *dependent, AnchorT anchor) |
| Get a read-only analysis state for the given point and create a dependency on dependent. | |
| ProgramPoint * | getProgramPointBefore (Operation *op) |
| Get a uniqued program point instance. | |
| ProgramPoint * | getProgramPointBefore (Block *block) |
| ProgramPoint * | getProgramPointAfter (Operation *op) |
| ProgramPoint * | getProgramPointAfter (Block *block) |
| const DataFlowConfig & | getSolverConfig () const |
| Return the configuration of the solver used for this analysis. | |
Strided metadata range analysis determines the strided metadata ranges of SSA values using operations that define InferStridedMetadataInterface.
This analysis depends on DeadCodeAnalysis, SparseConstantPropagation, and IntegerRangeAnalysis, and will be a silent no-op if the analyses are not loaded in the same solver context.
Definition at line 30 of file StridedMetadataRangeAnalysis.h.
| StridedMetadataRangeAnalysis::StridedMetadataRangeAnalysis | ( | DataFlowSolver & | solver, |
| int32_t | indexBitwidth = 64 ) |
Definition at line 73 of file StridedMetadataRangeAnalysis.cpp.
References mlir::DataFlowAnalysis::DataFlowSolver, and mlir::dataflow::SparseForwardDataFlowAnalysis< StridedMetadataRangeLattice >::SparseForwardDataFlowAnalysis().
|
overridevirtual |
At an entry point, we cannot reason about strided metadata ranges unless the type also encodes the data.
For example, a memref with static layout.
Implements mlir::dataflow::SparseForwardDataFlowAnalysis< StridedMetadataRangeLattice >.
Definition at line 79 of file StridedMetadataRangeAnalysis.cpp.
References mlir::dataflow::Lattice< ValueT >::getAnchor(), getEntryStateImpl(), mlir::dataflow::Lattice< ValueT >::join(), and mlir::DataFlowAnalysis::propagateIfChanged().
|
overridevirtual |
Visit an operation.
Invoke the transfer function on each operation that implements InferStridedMetadataInterface.
Implements mlir::dataflow::SparseForwardDataFlowAnalysis< StridedMetadataRangeLattice >.
Definition at line 85 of file StridedMetadataRangeAnalysis.cpp.
References mlir::changed, mlir::DataFlowAnalysis::getOrCreateFor(), mlir::DataFlowAnalysis::getProgramPointAfter(), mlir::Operation::getResults(), mlir::dataflow::Lattice< ValueT >::getValue(), mlir::dataflow::Lattice< ValueT >::join(), mlir::DataFlowAnalysis::propagateIfChanged(), result, mlir::dataflow::SparseForwardDataFlowAnalysis< StridedMetadataRangeLattice >::setAllToEntryStates(), and success().