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

This is a simple analysis state that represents whether the associated program point (either a block or a control-flow edge) is live. More...

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

+ Inheritance diagram for mlir::dataflow::Executable:

Public Member Functions

ChangeResult setToLive ()
 Set the state of the program point to live. More...
 
bool isLive () const
 Get whether the program point is live. More...
 
void print (raw_ostream &os) const override
 Print the liveness. More...
 
void onUpdate (DataFlowSolver *solver) const override
 When the state of the program point is changed to live, re-invoke subscribed analyses on the operations in the block and on the block itself. More...
 
void blockContentSubscribe (DataFlowAnalysis *analysis)
 Subscribe an analysis to changes to the liveness. More...
 
 AnalysisState (ProgramPoint point)
 Create the analysis state at the given program point. 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...
 

Additional Inherited Members

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

Detailed Description

This is a simple analysis state that represents whether the associated program point (either a block or a control-flow edge) is live.

Definition at line 39 of file DeadCodeAnalysis.h.

Member Function Documentation

◆ AnalysisState()

mlir::AnalysisState::AnalysisState
inline

Create the analysis state at the given program point.

Definition at line 319 of file DataFlowFramework.h.

◆ blockContentSubscribe()

void mlir::dataflow::Executable::blockContentSubscribe ( DataFlowAnalysis analysis)
inline

Subscribe an analysis to changes to the liveness.

Definition at line 58 of file DeadCodeAnalysis.h.

◆ isLive()

bool mlir::dataflow::Executable::isLive ( ) const
inline

Get whether the program point is live.

Definition at line 47 of file DeadCodeAnalysis.h.

◆ onUpdate()

void Executable::onUpdate ( DataFlowSolver solver) const
overridevirtual

When the state of the program point is changed to live, re-invoke subscribed analyses on the operations in the block and on the block itself.

Reimplemented from mlir::AnalysisState.

Definition at line 47 of file DeadCodeAnalysis.cpp.

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

◆ print()

void Executable::print ( raw_ostream &  os) const
overridevirtual

Print the liveness.

Implements mlir::AnalysisState.

Definition at line 43 of file DeadCodeAnalysis.cpp.

◆ setToLive()

ChangeResult Executable::setToLive ( )

Set the state of the program point to live.

Definition at line 36 of file DeadCodeAnalysis.cpp.

References mlir::Change, and mlir::NoChange.


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