MLIR
18.0.0git
|
This lattice element represents the integer value range of an SSA value. More...
#include "mlir/Analysis/DataFlow/IntegerRangeAnalysis.h"
Public Member Functions | |
void | onUpdate (DataFlowSolver *solver) const override |
If the range can be narrowed to an integer constant, update the constant value of the SSA value. More... | |
![]() | |
Value | getPoint () const |
Return the program point this lattice is located at. More... | |
IntegerValueRange & | getValue () |
Return the value held by this lattice. More... | |
const IntegerValueRange & | getValue () const |
ChangeResult | join (const AbstractSparseLattice &rhs) override |
Join the information contained in the 'rhs' lattice into this lattice. More... | |
ChangeResult | join (const IntegerValueRange &rhs) |
Join the information contained in the 'rhs' value into this lattice. More... | |
ChangeResult | meet (const AbstractSparseLattice &rhs) override |
Meet (intersect) the information contained in the 'rhs' lattice with this lattice. More... | |
ChangeResult | meet (const VT &rhs) |
Meet (intersect) the information contained in the 'rhs' value with this lattice. More... | |
ChangeResult | meet (const VT &rhs) |
void | print (raw_ostream &os) const override |
Print the lattice element. More... | |
AbstractSparseLattice (Value value) | |
Lattices can only be created for values. More... | |
![]() | |
AbstractSparseLattice (Value value) | |
Lattices can only be created for values. More... | |
Value | getPoint () const |
Return the program point this lattice is located at. More... | |
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. More... | |
void | useDefSubscribe (DataFlowAnalysis *analysis) |
Subscribe an analysis to updates of the lattice. More... | |
![]() | |
virtual | ~AnalysisState () |
AnalysisState (ProgramPoint point) | |
Create the analysis state at the given program point. More... | |
ProgramPoint | getPoint () const |
Returns the program point this state is located at. More... | |
LLVM_DUMP_METHOD void | dump () const |
void | addDependency (ProgramPoint dependent, DataFlowAnalysis *analysis) |
Add a dependency to this analysis state on a program point and an analysis. More... | |
Additional Inherited Members | |
![]() | |
using | LatticeT = Lattice< IntegerValueRange > |
using | has_meet = decltype(std::declval< T >().meet()) |
Trait to check if T provides a meet method. More... | |
using | lattice_has_meet = llvm::is_detected< has_meet, T > |
![]() | |
ProgramPoint | point |
The program point to which the state belongs. More... | |
This lattice element represents the integer value range of an SSA value.
When this lattice is updated, it automatically updates the constant value of the SSA value (if the range can be narrowed to one).
Definition at line 75 of file IntegerRangeAnalysis.h.
|
overridevirtual |
If the range can be narrowed to an integer constant, update the constant value of the SSA value.
Reimplemented from mlir::AnalysisState.
Definition at line 50 of file IntegerRangeAnalysis.cpp.
References mlir::get(), mlir::ConstantIntRanges::getConstantValue(), mlir::DataFlowSolver::getOrCreateState(), mlir::dataflow::ConstantValue::getUnknownConstant(), mlir::dataflow::Lattice< IntegerValueRange >::getValue(), mlir::dataflow::IntegerValueRange::getValue(), mlir::dataflow::AbstractSparseLattice::onUpdate(), mlir::AnalysisState::point, and mlir::DataFlowSolver::propagateIfChanged().