MLIR 24.0.0git
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.

Public Member Functions

 ProgramPoint (Block *parentBlock, Block::iterator pp)
 Creates a new program point at the given location.
 ProgramPoint (Operation *op)
 Creates a new program point at the given operation.
 ProgramPoint ()
 Create a empty program point.
 ProgramPoint (const ProgramPoint &point)
 Create a new program point from the given program point.
bool isNull () const
 Returns true if this program point is set.
bool operator== (const KeyTy &key) const
 Two program points are equal if their block and iterator are equal.
bool operator== (const ProgramPoint &pp) const
Block * getBlock () const
 Get the block contains this program point.
Block::iterator getPoint () const
 Get the the iterator this program point refers to.
Operation * getOperation () const
 Get the the iterator this program point refers to.
Operation * getNextOp () const
 Get the next operation of this program point.
Operation * getPrevOp () const
 Get the previous operation of this program point.
bool isBlockStart () const
bool isBlockEnd () const
void print (raw_ostream &os) const
 Print the program point.

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

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 59 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 69 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 61 of file DataFlowFramework.h.

Referenced by construct(), operator==(), and ProgramPoint().

◆ ProgramPoint() [2/4]

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

Creates a new program point at the given operation.

Definition at line 65 of file DataFlowFramework.h.

◆ ProgramPoint() [3/4]

mlir::ProgramPoint::ProgramPoint ( )
inline

Create a empty program point.

Definition at line 72 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 75 of file DataFlowFramework.h.

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

Member Function Documentation

◆ construct()

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

◆ getBlock()

◆ getNextOp()

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

Get the next operation of this program point.

Definition at line 111 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 108 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 105 of file DataFlowFramework.h.

Referenced by llvm::DenseMapInfo< mlir::ProgramPoint >::getHashValue(), and ProgramPoint().

◆ getPrevOp()

◆ isBlockEnd()

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

◆ isBlockStart()

◆ isNull()

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

Returns true if this program point is set.

Definition at line 89 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 92 of file DataFlowFramework.h.

◆ operator==() [2/2]

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

Definition at line 97 of file DataFlowFramework.h.

References ProgramPoint().

◆ print()

void ProgramPoint::print ( raw_ostream & os) const

Print the program point.

Definition at line 60 of file DataFlowFramework.cpp.

References getNextOp(), getPrevOp(), isBlockEnd(), isBlockStart(), and isNull().

Referenced by mlir::operator<<().


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