MLIR  20.0.0git
Public Types | Public Member Functions | Static Public Member Functions | List of all members
mlir::ProgramPoint Struct Reference

Program point represents a specific location in the execution of a program. More...

#include "mlir/Analysis/DataFlowFramework.h"

+ Inheritance diagram for mlir::ProgramPoint:

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
 
BlockgetBlock () const
 Get the block contains this program point. More...
 
Block::iterator getPoint () const
 Get the the iterator this program point refers to. More...
 
OperationgetOperation () const
 Get the the iterator this program point refers to. More...
 
OperationgetNextOp () const
 Get the next operation of this program point. More...
 
OperationgetPrevOp () 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 ProgramPointconstruct (StorageUniquer::StorageAllocator &alloc, KeyTy &&key)
 

Additional Inherited Members

- Protected Member Functions inherited from mlir::StorageUniquer::BaseStorage
 BaseStorage ()=default
 

Detailed Description

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.

Member Typedef Documentation

◆ KeyTy

The concrete key type used by the storage uniquer.

This class is uniqued by its contents.

Definition at line 66 of file DataFlowFramework.h.

Constructor & Destructor Documentation

◆ ProgramPoint() [1/4]

mlir::ProgramPoint::ProgramPoint ( Block parentBlock,
Block::iterator  pp 
)
inline

Creates a new program point at the given location.

Definition at line 58 of file DataFlowFramework.h.

◆ ProgramPoint() [2/4]

mlir::ProgramPoint::ProgramPoint ( Operation op)
inline

Creates a new program point at the given operation.

Definition at line 62 of file DataFlowFramework.h.

◆ ProgramPoint() [3/4]

mlir::ProgramPoint::ProgramPoint ( )
inline

Create a empty program point.

Definition at line 69 of file DataFlowFramework.h.

Referenced by construct().

◆ ProgramPoint() [4/4]

mlir::ProgramPoint::ProgramPoint ( const ProgramPoint point)
inline

Create a new program point from the given program point.

Definition at line 72 of file DataFlowFramework.h.

References getBlock(), getOperation(), and getPoint().

Member Function Documentation

◆ construct()

static ProgramPoint* mlir::ProgramPoint::construct ( StorageUniquer::StorageAllocator alloc,
KeyTy &&  key 
)
inlinestatic

◆ getBlock()

Block* mlir::ProgramPoint::getBlock ( ) const
inline

◆ getNextOp()

Operation* mlir::ProgramPoint::getNextOp ( ) const
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().

◆ getOperation()

Operation* mlir::ProgramPoint::getOperation ( ) const
inline

Get the the iterator this program point refers to.

Definition at line 107 of file DataFlowFramework.h.

Referenced by ProgramPoint().

◆ getPoint()

Block::iterator mlir::ProgramPoint::getPoint ( ) const
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().

◆ getPrevOp()

Operation* mlir::ProgramPoint::getPrevOp ( ) const
inline

◆ isBlockEnd()

bool mlir::ProgramPoint::isBlockEnd ( ) const
inline

◆ isBlockStart()

bool mlir::ProgramPoint::isBlockStart ( ) const
inline

◆ isNull()

bool mlir::ProgramPoint::isNull ( ) const
inline

Returns true if this program point is set.

Definition at line 88 of file DataFlowFramework.h.

Referenced by print().

◆ operator==() [1/2]

bool mlir::ProgramPoint::operator== ( const KeyTy key) const
inline

Two program points are equal if their block and iterator are equal.

Definition at line 91 of file DataFlowFramework.h.

◆ operator==() [2/2]

bool mlir::ProgramPoint::operator== ( const ProgramPoint pp) const
inline

Definition at line 96 of file DataFlowFramework.h.

◆ print()

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<<().


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