MLIR  19.0.0git
Public Member Functions | List of all members
mlir::dataflow::AbstractSparseLattice Class Reference

This class represents an abstract lattice. More...

#include "mlir/Analysis/DataFlow/SparseAnalysis.h"

+ Inheritance diagram for mlir::dataflow::AbstractSparseLattice:

Public Member Functions

 AbstractSparseLattice (Value value)
 Lattices can only be created for values. More...
 
Value getPoint () const
 Return the program point this lattice is located at. More...
 
virtual ChangeResult join (const AbstractSparseLattice &rhs)
 Join the information contained in 'rhs' into this lattice. More...
 
virtual ChangeResult meet (const AbstractSparseLattice &rhs)
 Meet (intersect) the information in this lattice with 'rhs'. 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...
 
- Public Member Functions inherited from mlir::AnalysisState
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...
 
virtual void print (raw_ostream &os) const =0
 Print the contents of the analysis state. 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

- Protected Attributes inherited from mlir::AnalysisState
ProgramPoint point
 The program point to which the state belongs. More...
 

Detailed Description

This class represents an abstract lattice.

A lattice contains information about an SSA value and is what's propagated across the IR by sparse data-flow analysis.

Definition at line 34 of file SparseAnalysis.h.

Constructor & Destructor Documentation

◆ AbstractSparseLattice()

mlir::dataflow::AbstractSparseLattice::AbstractSparseLattice ( Value  value)
inline

Lattices can only be created for values.

Definition at line 37 of file SparseAnalysis.h.

Member Function Documentation

◆ getPoint()

Value mlir::dataflow::AbstractSparseLattice::getPoint ( ) const
inline

Return the program point this lattice is located at.

Definition at line 40 of file SparseAnalysis.h.

References mlir::AnalysisState::getPoint().

◆ join()

virtual ChangeResult mlir::dataflow::AbstractSparseLattice::join ( const AbstractSparseLattice rhs)
inlinevirtual

Join the information contained in 'rhs' into this lattice.

Returns if the value of the lattice changed.

Reimplemented in mlir::dataflow::Lattice< ValueT >, and mlir::dataflow::Lattice< IntegerValueRange >.

Definition at line 44 of file SparseAnalysis.h.

References mlir::NoChange.

Referenced by mlir::dataflow::AbstractSparseForwardDataFlowAnalysis::join().

◆ meet()

virtual ChangeResult mlir::dataflow::AbstractSparseLattice::meet ( const AbstractSparseLattice rhs)
inlinevirtual

Meet (intersect) the information in this lattice with 'rhs'.

Returns if the value of the lattice changed.

Reimplemented in mlir::dataflow::Lattice< ValueT >, mlir::dataflow::Lattice< IntegerValueRange >, and mlir::dataflow::Liveness.

Definition at line 50 of file SparseAnalysis.h.

References mlir::NoChange.

Referenced by mlir::dataflow::AbstractSparseBackwardDataFlowAnalysis::meet().

◆ onUpdate()

void AbstractSparseLattice::onUpdate ( DataFlowSolver solver) const
overridevirtual

When the lattice gets updated, propagate an update to users of the value using its use-def chain to subscribed analyses.

Reimplemented from mlir::AnalysisState.

Definition at line 34 of file SparseAnalysis.cpp.

References mlir::DataFlowSolver::enqueue(), mlir::Value::getUsers(), mlir::AnalysisState::onUpdate(), and mlir::AnalysisState::point.

Referenced by mlir::dataflow::IntegerValueRangeLattice::onUpdate().

◆ useDefSubscribe()

void mlir::dataflow::AbstractSparseLattice::useDefSubscribe ( DataFlowAnalysis analysis)
inline

Subscribe an analysis to updates of the lattice.

When the lattice changes, subscribed analyses are re-invoked on all users of the value. This is more efficient than relying on the dependency map.

Definition at line 61 of file SparseAnalysis.h.


The documentation for this class was generated from the following files: