MLIR
20.0.0git
|
Program point represents a specific location in the execution of a program. More...
#include "mlir/Analysis/DataFlowFramework.h"
Public Types | |
using | KeyTy = std::tuple< Block *, Block::iterator, Operation * > |
The concrete key type used by the storage uniquer. More... | |
Public Member Functions | |
ProgramPoint (Block *parentBlock, Block::iterator pp) | |
Creates a new program point at the given location. More... | |
ProgramPoint (Operation *op) | |
Creates a new program point at the given operation. More... | |
ProgramPoint () | |
Create a empty program point. More... | |
ProgramPoint (const ProgramPoint &point) | |
Create a new program point from the given program point. More... | |
bool | isNull () const |
Returns true if this program point is set. More... | |
bool | operator== (const KeyTy &key) const |
Two program points are equal if their block and iterator are equal. More... | |
bool | operator== (const ProgramPoint &pp) const |
Block * | getBlock () const |
Get the block contains this program point. More... | |
Block::iterator | getPoint () const |
Get the the iterator this program point refers to. More... | |
Operation * | getOperation () const |
Get the the iterator this program point refers to. More... | |
Operation * | getNextOp () const |
Get the next operation of this program point. More... | |
Operation * | getPrevOp () const |
Get the previous operation of this program point. More... | |
bool | isBlockStart () const |
bool | isBlockEnd () const |
void | print (raw_ostream &os) const |
Print the program point. More... | |
Static Public Member Functions | |
static ProgramPoint * | construct (StorageUniquer::StorageAllocator &alloc, KeyTy &&key) |
Additional Inherited Members | |
Protected Member Functions inherited from mlir::StorageUniquer::BaseStorage | |
BaseStorage ()=default | |
Program point represents a specific location in the execution of a program.
A sequence of program points can be combined into a control flow graph.
Definition at line 56 of file DataFlowFramework.h.
using mlir::ProgramPoint::KeyTy = std::tuple<Block *, Block::iterator, Operation *> |
The concrete key type used by the storage uniquer.
This class is uniqued by its contents.
Definition at line 66 of file DataFlowFramework.h.
|
inline |
Creates a new program point at the given location.
Definition at line 58 of file DataFlowFramework.h.
|
inline |
Creates a new program point at the given operation.
Definition at line 62 of file DataFlowFramework.h.
|
inline |
Create a empty program point.
Definition at line 69 of file DataFlowFramework.h.
Referenced by construct().
|
inline |
Create a new program point from the given program point.
Definition at line 72 of file DataFlowFramework.h.
References getBlock(), getOperation(), and getPoint().
|
inlinestatic |
Definition at line 78 of file DataFlowFramework.h.
References mlir::StorageUniquer::StorageAllocator::allocate(), and ProgramPoint().
|
inline |
Get the block contains this program point.
Definition at line 101 of file DataFlowFramework.h.
Referenced by llvm::DenseMapInfo< mlir::ProgramPoint >::getHashValue(), mlir::LatticeAnchor::getLoc(), ProgramPoint(), mlir::dataflow::AbstractDenseForwardDataFlowAnalysis::visit(), mlir::dataflow::AbstractDenseBackwardDataFlowAnalysis::visit(), mlir::dataflow::AbstractSparseForwardDataFlowAnalysis::visit(), and mlir::dataflow::AbstractDenseForwardDataFlowAnalysis::visitRegionBranchOperation().
|
inline |
Get the next operation of this program point.
Definition at line 110 of file DataFlowFramework.h.
References isBlockEnd().
Referenced by print(), and mlir::dataflow::AbstractDenseBackwardDataFlowAnalysis::visit().
|
inline |
Get the the iterator this program point refers to.
Definition at line 107 of file DataFlowFramework.h.
Referenced by ProgramPoint().
|
inline |
Get the the iterator this program point refers to.
Definition at line 104 of file DataFlowFramework.h.
Referenced by llvm::DenseMapInfo< mlir::ProgramPoint >::getHashValue(), and ProgramPoint().
|
inline |
Get the previous operation of this program point.
Definition at line 122 of file DataFlowFramework.h.
References isBlockStart().
Referenced by mlir::LatticeAnchor::getLoc(), print(), mlir::dataflow::DeadCodeAnalysis::visit(), mlir::dataflow::AbstractDenseForwardDataFlowAnalysis::visit(), mlir::dataflow::AbstractSparseForwardDataFlowAnalysis::visit(), mlir::dataflow::AbstractSparseBackwardDataFlowAnalysis::visit(), and mlir::dataflow::AbstractDenseForwardDataFlowAnalysis::visitRegionBranchOperation().
|
inline |
Definition at line 135 of file DataFlowFramework.h.
References mlir::Block::end().
Referenced by getNextOp(), and mlir::dataflow::AbstractDenseBackwardDataFlowAnalysis::visit().
|
inline |
Definition at line 133 of file DataFlowFramework.h.
References mlir::Block::begin().
Referenced by mlir::LatticeAnchor::getLoc(), getPrevOp(), print(), mlir::dataflow::DeadCodeAnalysis::visit(), mlir::dataflow::AbstractDenseForwardDataFlowAnalysis::visit(), mlir::dataflow::AbstractSparseForwardDataFlowAnalysis::visit(), mlir::dataflow::AbstractSparseBackwardDataFlowAnalysis::visit(), and mlir::dataflow::AbstractDenseForwardDataFlowAnalysis::visitRegionBranchOperation().
|
inline |
Returns true if this program point is set.
Definition at line 88 of file DataFlowFramework.h.
Referenced by print().
|
inline |
Two program points are equal if their block and iterator are equal.
Definition at line 91 of file DataFlowFramework.h.
|
inline |
Definition at line 96 of file DataFlowFramework.h.
void ProgramPoint::print | ( | raw_ostream & | os | ) | const |
Print the program point.
Definition at line 59 of file DataFlowFramework.cpp.
References getNextOp(), getPrevOp(), isBlockStart(), isNull(), and mlir::Operation::print().
Referenced by mlir::operator<<().