MLIR
20.0.0git
|
An operation position describes an operation node in the IR. More...
#include "Conversion/PDLToPDLInterp/Predicate.h"
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... | |
![]() | |
PredicateBase (KeyT &&key) | |
bool | operator== (const KeyTy &key) const |
Utility methods required by the storage allocator. More... | |
const KeyTy & | getValue () const |
Return the key value of this predicate. More... | |
![]() | |
Position (Predicates::Kind kind) | |
virtual | ~Position () |
unsigned | getOperationDepth () const |
Returns the depth of the first ancestor operation position. More... | |
Position * | getParent () 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 OperationPosition * | getRoot (StorageUniquer &uniquer) |
Gets the root position. More... | |
static OperationPosition * | get (StorageUniquer &uniquer, Position *parent) |
Gets an operation position with the given parent. More... | |
![]() | |
static OperationPosition * | get (StorageUniquer &uniquer, Args &&...args) |
Get an instance of this position. More... | |
static OperationPosition * | construct (StorageUniquer::StorageAllocator &alloc, KeyT &&key) |
Construct an instance with the given storage allocator. More... | |
static bool | classof (const Position *pred) |
Additional Inherited Members | |
![]() | |
using | KeyTy = std::pair< Position *, unsigned > |
using | Base = PredicateBase< OperationPosition, Position, std::pair< Position *, unsigned >, Kind > |
![]() | |
BaseStorage ()=default | |
![]() | |
KeyTy | key |
![]() | |
Position * | parent = nullptr |
Link to the parent position. More... | |
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.
|
inlineexplicit |
Definition at line 254 of file Predicate.h.
References mlir::pdl_to_pdl_interp::PredicateBase< OperationPosition, Position, std::pair< Position *, unsigned >, Predicates::OperationPos >::key, and mlir::pdl_to_pdl_interp::Position::parent.
|
inlinestatic |
Gets an operation position with the given parent.
Definition at line 269 of file Predicate.h.
References mlir::pdl_to_pdl_interp::PredicateBase< ConcreteT, BaseT, Key, Kind >::get(), mlir::pdl_to_pdl_interp::Position::getOperationDepth(), and mlir::pdl_to_pdl_interp::Position::parent.
Referenced by mlir::pdl_to_pdl_interp::PredicateBuilder::getOperandDefiningOp(), and mlir::pdl_to_pdl_interp::PredicateBuilder::getPassthroughOp().
|
inline |
Returns the depth of this position.
Definition at line 274 of file Predicate.h.
Referenced by isRoot().
|
inlinestatic |
Gets the root position.
Definition at line 264 of file Predicate.h.
References mlir::pdl_to_pdl_interp::PredicateBase< ConcreteT, BaseT, Key, Kind >::get().
Referenced by mlir::pdl_to_pdl_interp::PredicateBuilder::getRoot().
|
inlinestatic |
Returns a hash suitable for the given keytype.
Definition at line 259 of file Predicate.h.
References mlir::polynomial::hash_value(), and mlir::pdl_to_pdl_interp::PredicateBase< OperationPosition, Position, std::pair< Position *, unsigned >, Predicates::OperationPos >::key.
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.
|
inline |
Returns if this operation position corresponds to the root.
Definition at line 277 of file Predicate.h.
References getDepth().