MLIR  19.0.0git
Public Member Functions | Static Public Member Functions | List of all members
mlir::pdl_to_pdl_interp::OperationPosition Struct Reference

An operation position describes an operation node in the IR. More...

#include "Conversion/PDLToPDLInterp/Predicate.h"

+ Inheritance diagram for mlir::pdl_to_pdl_interp::OperationPosition:

Public Member Functions

 OperationPosition (const KeyTy &key)
 
unsigned getDepth () const
 Returns the depth of this position. More...
 
bool isRoot () const
 Returns if this operation position corresponds to the root. More...
 
bool isOperandDefiningOp () const
 Returns if this operation represents an operand defining op. More...
 
- Public Member Functions inherited from mlir::pdl_to_pdl_interp::PredicateBase< OperationPosition, Position, std::pair< Position *, unsigned >, Predicates::OperationPos >
 PredicateBase (KeyT &&key)
 
bool operator== (const KeyTy &key) const
 Utility methods required by the storage allocator. More...
 
const KeyTygetValue () const
 Return the key value of this predicate. More...
 
- Public Member Functions inherited from mlir::pdl_to_pdl_interp::Position
 Position (Predicates::Kind kind)
 
virtual ~Position ()
 
unsigned getOperationDepth () const
 Returns the depth of the first ancestor operation position. More...
 
PositiongetParent () const
 Returns the parent position. The root operation position has no parent. More...
 
Predicates::Kind getKind () const
 Returns the kind of this position. More...
 

Static Public Member Functions

static llvm::hash_code hashKey (const KeyTy &key)
 Returns a hash suitable for the given keytype. More...
 
static OperationPositiongetRoot (StorageUniquer &uniquer)
 Gets the root position. More...
 
static OperationPositionget (StorageUniquer &uniquer, Position *parent)
 Gets an operation position with the given parent. More...
 
- Static Public Member Functions inherited from mlir::pdl_to_pdl_interp::PredicateBase< OperationPosition, Position, std::pair< Position *, unsigned >, Predicates::OperationPos >
static OperationPositionget (StorageUniquer &uniquer, Args &&...args)
 Get an instance of this position. More...
 
static OperationPositionconstruct (StorageUniquer::StorageAllocator &alloc, KeyT &&key)
 Construct an instance with the given storage allocator. More...
 
static bool classof (const Position *pred)
 

Additional Inherited Members

- Public Types inherited from mlir::pdl_to_pdl_interp::PredicateBase< OperationPosition, Position, std::pair< Position *, unsigned >, Predicates::OperationPos >
using KeyTy = std::pair< Position *, unsigned >
 
using Base = PredicateBase< OperationPosition, Position, std::pair< Position *, unsigned >, Kind >
 
- Protected Member Functions inherited from mlir::StorageUniquer::BaseStorage
 BaseStorage ()=default
 
- Protected Attributes inherited from mlir::pdl_to_pdl_interp::PredicateBase< OperationPosition, Position, std::pair< Position *, unsigned >, Predicates::OperationPos >
KeyTy key
 
- Protected Attributes inherited from mlir::pdl_to_pdl_interp::Position
Positionparent = nullptr
 Link to the parent position. More...
 

Detailed Description

An operation position describes an operation node in the IR.

Other position kinds are formed with respect to an operation position.

Definition at line 251 of file Predicate.h.

Constructor & Destructor Documentation

◆ OperationPosition()

mlir::pdl_to_pdl_interp::OperationPosition::OperationPosition ( const KeyTy key)
inlineexplicit

Member Function Documentation

◆ get()

static OperationPosition* mlir::pdl_to_pdl_interp::OperationPosition::get ( StorageUniquer uniquer,
Position parent 
)
inlinestatic

◆ getDepth()

unsigned mlir::pdl_to_pdl_interp::OperationPosition::getDepth ( ) const
inline

◆ getRoot()

static OperationPosition* mlir::pdl_to_pdl_interp::OperationPosition::getRoot ( StorageUniquer uniquer)
inlinestatic

◆ hashKey()

static llvm::hash_code mlir::pdl_to_pdl_interp::OperationPosition::hashKey ( const KeyTy key)
inlinestatic

◆ isOperandDefiningOp()

bool OperationPosition::isOperandDefiningOp ( ) const

Returns if this operation represents an operand defining op.

Definition at line 51 of file Predicate.cpp.

References mlir::pdl_to_pdl_interp::Position::parent.

◆ isRoot()

bool mlir::pdl_to_pdl_interp::OperationPosition::isRoot ( ) const
inline

Returns if this operation position corresponds to the root.

Definition at line 277 of file Predicate.h.

References getDepth().


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