|
MLIR 22.0.0git
|
This class represents a lattice holding a specific value of type ValueT. More...
#include "mlir/Analysis/DataFlow/SparseAnalysis.h"
Public Types | |
| using | LatticeT = Lattice<ValueT> |
| template<typename T, typename... Args> | |
| using | has_meet = decltype(&T::meet) |
| Trait to check if T provides a meet method. | |
| template<typename T> | |
| using | lattice_has_meet = llvm::is_detected<has_meet, T> |
Public Member Functions | |
| Value | getAnchor () const |
| Return the value this lattice is located at. | |
| ValueT & | getValue () |
| Return the value held by this lattice. | |
| const ValueT & | getValue () const |
| ChangeResult | join (const AbstractSparseLattice &rhs) override |
| Join the information contained in the 'rhs' lattice into this lattice. | |
| ChangeResult | meet (const AbstractSparseLattice &rhs) override |
| Meet (intersect) the information contained in the 'rhs' lattice with this lattice. | |
| ChangeResult | join (const ValueT &rhs) |
| Join the information contained in the 'rhs' value into this lattice. | |
| template<typename VT, std::enable_if_t< lattice_has_meet< VT >::value > * = nullptr> | |
| ChangeResult | meet (const VT &rhs) |
| Meet (intersect) the information contained in the 'rhs' value with this lattice. | |
| template<typename VT, std::enable_if_t<!lattice_has_meet< VT >::value > * = nullptr> | |
| ChangeResult | meet (const VT &rhs) |
| void | print (raw_ostream &os) const override |
| Print the lattice element. | |
| AbstractSparseLattice (Value value) | |
| Lattices can only be created for values. | |
| Public Member Functions inherited from mlir::dataflow::AbstractSparseLattice | |
| AbstractSparseLattice (Value value) | |
| Lattices can only be created for values. | |
| Value | getAnchor () const |
| Return the value this lattice is located at. | |
| void | onUpdate (DataFlowSolver *solver) const override |
| When the lattice gets updated, propagate an update to users of the value using its use-def chain to subscribed analyses. | |
| void | useDefSubscribe (DataFlowAnalysis *analysis) |
| Subscribe an analysis to updates of the lattice. | |
| Public Member Functions inherited from mlir::AnalysisState | |
| virtual | ~AnalysisState () |
| AnalysisState (LatticeAnchor anchor) | |
| Create the analysis state on the given lattice anchor. | |
| LatticeAnchor | getAnchor () const |
| Returns the lattice anchor this state is located at. | |
| LLVM_DUMP_METHOD void | dump () const |
| void | addDependency (ProgramPoint *point, DataFlowAnalysis *analysis) |
| Add a dependency to this analysis state on a lattice anchor and an analysis. | |
Additional Inherited Members | |
| Protected Attributes inherited from mlir::AnalysisState | |
| LatticeAnchor | anchor |
| The lattice anchor to which the state belongs. | |
This class represents a lattice holding a specific value of type ValueT.
Lattice values (ValueT) are required to adhere to the following:
Definition at line 85 of file SparseAnalysis.h.
| using mlir::dataflow::Lattice< ValueT >::has_meet = decltype(&T::meet) |
Trait to check if T provides a meet method.
Needed since for forward analysis, lattices will only have a join, no meet, but we want to use the same Lattice class for both directions.
Definition at line 135 of file SparseAnalysis.h.
| using mlir::dataflow::Lattice< ValueT >::lattice_has_meet = llvm::is_detected<has_meet, T> |
Definition at line 137 of file SparseAnalysis.h.
| using mlir::dataflow::Lattice< ValueT >::LatticeT = Lattice<ValueT> |
Definition at line 99 of file SparseAnalysis.h.
|
inline |
Lattices can only be created for values.
Definition at line 37 of file SparseAnalysis.h.
|
inline |
Return the value this lattice is located at.
Definition at line 90 of file SparseAnalysis.h.
References mlir::AnalysisState::anchor.
Referenced by mlir::dataflow::IntegerRangeAnalysis::setToEntryState(), and mlir::dataflow::StridedMetadataRangeAnalysis::setToEntryState().
|
inline |
Return the value held by this lattice.
This requires that the value is initialized.
Definition at line 94 of file SparseAnalysis.h.
Referenced by getValue(), join(), meet(), mlir::dataflow::IntegerRangeAnalysis::visitNonControlFlowArguments(), mlir::dataflow::IntegerRangeAnalysis::visitOperation(), and mlir::dataflow::StridedMetadataRangeAnalysis::visitOperation().
|
inline |
Definition at line 95 of file SparseAnalysis.h.
References getValue().
|
inlineoverridevirtual |
Join the information contained in the 'rhs' lattice into this lattice.
Returns if the state of the current lattice changed.
Reimplemented from mlir::dataflow::AbstractSparseLattice.
Definition at line 103 of file SparseAnalysis.h.
References AbstractSparseLattice(), getValue(), join(), and rhs.
Referenced by copyIntegerRange(), join(), mlir::dataflow::IntegerRangeAnalysis::setToEntryState(), mlir::dataflow::SparseConstantPropagation::setToEntryState(), mlir::dataflow::StridedMetadataRangeAnalysis::setToEntryState(), mlir::dataflow::IntegerRangeAnalysis::visitNonControlFlowArguments(), mlir::dataflow::IntegerRangeAnalysis::visitOperation(), mlir::dataflow::SparseConstantPropagation::visitOperation(), and mlir::dataflow::StridedMetadataRangeAnalysis::visitOperation().
|
inline |
Join the information contained in the 'rhs' value into this lattice.
Returns if the state of the current lattice changed.
Definition at line 115 of file SparseAnalysis.h.
References mlir::Change, mlir::NoChange, and rhs.
|
inlineoverridevirtual |
Meet (intersect) the information contained in the 'rhs' lattice with this lattice.
Returns if the state of the current lattice changed.
Reimplemented from mlir::dataflow::AbstractSparseLattice.
Definition at line 109 of file SparseAnalysis.h.
References AbstractSparseLattice(), getValue(), meet(), and rhs.
Referenced by meet().
|
inline |
Meet (intersect) the information contained in the 'rhs' value with this lattice.
Returns if the state of the current lattice changed. If the lattice elements don't have a meet method, this is a no-op (see below.)
Definition at line 144 of file SparseAnalysis.h.
References mlir::Change, mlir::NoChange, and rhs.
|
inline |
Definition at line 161 of file SparseAnalysis.h.
References mlir::NoChange, and rhs.
|
inlineoverridevirtual |
Print the lattice element.
Implements mlir::AnalysisState.
Definition at line 166 of file SparseAnalysis.h.