|
MLIR 22.0.0git
|
Classes | |
| class | AbstractDenseBackwardDataFlowAnalysis |
| Base class for dense backward dataflow analyses. More... | |
| class | AbstractDenseForwardDataFlowAnalysis |
| Base class for dense forward data-flow analyses. More... | |
| class | AbstractDenseLattice |
| This class represents a dense lattice. More... | |
| class | AbstractSparseBackwardDataFlowAnalysis |
| Base class for sparse backward data-flow analyses. More... | |
| class | AbstractSparseForwardDataFlowAnalysis |
| Base class for sparse forward data-flow analyses. More... | |
| class | AbstractSparseLattice |
| This class represents an abstract lattice. More... | |
| class | CFGEdge |
| This lattice anchor represents a control-flow edge between a block and one of its successors. More... | |
| class | ConstantValue |
| This lattice value represents a known constant value of a lattice. More... | |
| class | DeadCodeAnalysis |
| Dead code analysis analyzes control-flow, as understood by RegionBranchOpInterface and BranchOpInterface, and the callgraph, as understood by CallableOpInterface and CallOpInterface. More... | |
| class | DenseBackwardDataFlowAnalysis |
| A dense backward dataflow analysis propagating lattices after and before the execution of every operation across the IR by implementing transfer functions for opreations. More... | |
| class | DenseForwardDataFlowAnalysis |
| A dense forward data-flow analysis for propagating lattices before and after the execution of every operation across the IR by implementing transfer functions for operations. More... | |
| class | Executable |
| This is a simple analysis state that represents whether the associated lattice anchor (either a block or a control-flow edge) is live. More... | |
| class | IntegerRangeAnalysis |
| Integer range analysis determines the integer value range of SSA values using operations that define InferIntRangeInterface and also sets the range of iteration indices of loops with known bounds. More... | |
| class | IntegerValueRangeLattice |
| This lattice element represents the integer value range of an SSA value. More... | |
| class | Lattice |
| This class represents a lattice holding a specific value of type ValueT. More... | |
| struct | Liveness |
| This lattice represents, for a given value, whether or not it is "live". More... | |
| class | LivenessAnalysis |
| An analysis that, by going backwards along the dataflow graph, annotates each value with a boolean storing true iff it is "live". More... | |
| class | PredecessorState |
| This analysis state represents a set of live control-flow "predecessors" of a program point (either an operation or a block), which are the last operations along all execution paths that pass through this point. More... | |
| struct | RunLivenessAnalysis |
| Runs liveness analysis on the IR defined by op. More... | |
| class | SparseBackwardDataFlowAnalysis |
| A sparse (backward) data-flow analysis for propagating SSA value lattices backwards across the IR by implementing transfer functions for operations. More... | |
| class | SparseConstantPropagation |
| This analysis implements sparse constant propagation, which attempts to determine constant-valued results for operations using constant-valued operands, by speculatively folding operations. More... | |
| class | SparseForwardDataFlowAnalysis |
| A sparse forward data-flow analysis for propagating SSA value lattices across the IR by implementing transfer functions for operations. More... | |
| class | StridedMetadataRangeAnalysis |
| Strided metadata range analysis determines the strided metadata ranges of SSA values using operations that define InferStridedMetadataInterface. More... | |
| class | StridedMetadataRangeLattice |
| This lattice element represents the strided metadata of an SSA value. More... | |
Enumerations | |
| enum class | CallControlFlowAction { EnterCallee , ExitCallee , ExternalCallee } |
| Indicates whether the control enters, exits, or skips over the callee (in the case of external functions). More... | |
Functions | |
| LogicalResult | staticallyNonNegative (DataFlowSolver &solver, Operation *op) |
| Succeeds if an op can be converted to its unsigned equivalent without changing its semantics. | |
| LogicalResult | staticallyNonNegative (DataFlowSolver &solver, Value v) |
| Succeeds when a value is statically non-negative in that it has a lower bound on its value (if it is treated as signed) and that bound is non-negative. | |
| LogicalResult | maybeReplaceWithConstant (DataFlowSolver &solver, RewriterBase &rewriter, Value value) |
| Patterned after SCCP. | |
| void | loadBaselineAnalyses (DataFlowSolver &solver) |
| Populates a DataFlowSolver with analyses that are required to ensure user-defined analyses are run properly. | |
|
strong |
Indicates whether the control enters, exits, or skips over the callee (in the case of external functions).
| Enumerator | |
|---|---|
| EnterCallee | |
| ExitCallee | |
| ExternalCallee | |
Definition at line 32 of file DenseAnalysis.h.
|
inline |
Populates a DataFlowSolver with analyses that are required to ensure user-defined analyses are run properly.
This helper is intended to be an interim fix until a more robust solution can be implemented in the DataFlow framework directly. Cf. https://discourse.llvm.org/t/mlir-dead-code-analysis/67568
Definition at line 29 of file Utils.h.
References mlir::DataFlowSolver::load().
Referenced by mlir::dataflow::RunLivenessAnalysis::RunLivenessAnalysis().
| LogicalResult mlir::dataflow::maybeReplaceWithConstant | ( | DataFlowSolver & | solver, |
| RewriterBase & | rewriter, | ||
| Value | value ) |
Patterned after SCCP.
Definition at line 63 of file IntRangeOptimizations.cpp.
References copyIntegerRange(), mlir::DataFlowSolver::eraseState(), mlir::DenseIntElementsAttr::get(), mlir::Builder::getContext(), mlir::Value::getDefiningOp(), mlir::Operation::getDialect(), mlir::Builder::getIntegerAttr(), mlir::MLIRContext::getLoadedDialect(), mlir::Value::getLoc(), getMaybeConstantValue(), mlir::Region::getParentOp(), mlir::Value::getParentRegion(), mlir::Operation::getResult(), mlir::Value::getType(), mlir::DataFlowSolver::lookupState(), materializeConstant(), mlir::Dialect::materializeConstant(), mlir::RewriterBase::replaceAllUsesWith(), success(), and mlir::Value::use_empty().
| LogicalResult mlir::dataflow::staticallyNonNegative | ( | DataFlowSolver & | solver, |
| Operation * | op ) |
Succeeds if an op can be converted to its unsigned equivalent without changing its semantics.
This is the case when none of its openands or results can be below 0 when analyzed from a signed perspective.
Definition at line 53 of file IntegerRangeAnalysis.cpp.
References mlir::Operation::getOperands(), mlir::Operation::getResults(), staticallyNonNegative(), and success().
Referenced by staticallyNonNegative().
| LogicalResult mlir::dataflow::staticallyNonNegative | ( | DataFlowSolver & | solver, |
| Value | v ) |
Succeeds when a value is statically non-negative in that it has a lower bound on its value (if it is treated as signed) and that bound is non-negative.
Note, the results of this query may not be accurate for index if you plan to use a non-64-bit index.
Definition at line 45 of file IntegerRangeAnalysis.cpp.
References mlir::DataFlowSolver::lookupState(), result, mlir::ConstantIntRanges::smin(), and success().