MLIR
19.0.0git

This lattice represents, for a given value, whether or not it is "live". More...
#include "mlir/Analysis/DataFlow/LivenessAnalysis.h"
Public Member Functions  
void  print (raw_ostream &os) const override 
Print the contents of the analysis state. More...  
ChangeResult  markLive () 
ChangeResult  meet (const AbstractSparseLattice &other) override 
Meet (intersect) the information in this lattice with 'rhs'. More...  
AbstractSparseLattice (Value value)  
Lattices can only be created for values. More...  
Public Member Functions inherited from mlir::dataflow::AbstractSparseLattice  
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...  
void  onUpdate (DataFlowSolver *solver) const override 
When the lattice gets updated, propagate an update to users of the value using its usedef 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...  
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...  
Public Attributes  
bool  isLive = false 
Additional Inherited Members  
Protected Attributes inherited from mlir::AnalysisState  
ProgramPoint  point 
The program point to which the state belongs. More...  
This lattice represents, for a given value, whether or not it is "live".
A value is considered "live" iff it: (1) has memory effects OR (2) is returned by a public function OR (3) is used to compute a value of type (1) or (2). It is also to be noted that a value could be of multiple types (1/2/3) at the same time.
A value "has memory effects" iff it: (1.a) is an operand of an op with memory effects OR (1.b) is a nonforwarded branch operand and its branch op could take the control to a block that has an op with memory effects OR (1.c) is a nonforwarded call operand.
A value A
is said to be "used to compute" value B
iff B
cannot be computed in the absence of A
. Thus, in this implementation, we say that value A
is used to compute value B
iff: (3.a) B
is a result of an op with operand A
OR (3.b) A
is used to compute some value C
and C
is used to compute B
.
Definition at line 56 of file LivenessAnalysis.h.

inline 
Lattices can only be created for values.
Definition at line 37 of file SparseAnalysis.h.
ChangeResult Liveness::markLive  (  ) 
Definition at line 34 of file LivenessAnalysis.cpp.
References mlir::Change, isLive, and mlir::NoChange.
Referenced by meet(), mlir::dataflow::LivenessAnalysis::setToExitState(), and mlir::dataflow::LivenessAnalysis::visitCallOperand().

overridevirtual 
Meet (intersect) the information in this lattice with 'rhs'.
Returns if the value of the lattice changed.
Reimplemented from mlir::dataflow::AbstractSparseLattice.
Definition at line 40 of file LivenessAnalysis.cpp.
References isLive, markLive(), and mlir::NoChange.

overridevirtual 
Print the contents of the analysis state.
Implements mlir::AnalysisState.
Definition at line 30 of file LivenessAnalysis.cpp.
References isLive.
bool mlir::dataflow::Liveness::isLive = false 
Definition at line 69 of file LivenessAnalysis.h.
Referenced by markLive(), meet(), and print().