MLIR
20.0.0git
|
A position describes a value on the input IR on which a predicate may be applied, such as an operation or attribute. More...
#include "Conversion/PDLToPDLInterp/Predicate.h"
Public Member Functions | |
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... | |
Protected Attributes | |
Position * | parent = nullptr |
Link to the parent position. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from mlir::StorageUniquer::BaseStorage | |
BaseStorage ()=default | |
A position describes a value on the input IR on which a predicate may be applied, such as an operation or attribute.
This enables re-use between predicates, and assists generating bytecode and memory management.
Operation positions form the base of other positions, which are formed relative to a parent operation. Operations are anchored at Operand nodes, except for the root operation which is parentless.
Definition at line 144 of file Predicate.h.
|
inlineexplicit |
Definition at line 146 of file Predicate.h.
|
virtualdefault |
|
inline |
Returns the kind of this position.
Definition at line 156 of file Predicate.h.
unsigned Position::getOperationDepth | ( | ) | const |
Returns the depth of the first ancestor operation position.
Definition at line 21 of file Predicate.cpp.
References getOperationDepth(), and parent.
Referenced by comparePosDepth(), mlir::pdl_to_pdl_interp::OperationPosition::get(), and getOperationDepth().
|
inline |
Returns the parent position. The root operation position has no parent.
Definition at line 153 of file Predicate.h.
References parent.
|
protected |
Link to the parent position.
Definition at line 160 of file Predicate.h.
Referenced by mlir::pdl_to_pdl_interp::AttributePosition::AttributePosition(), mlir::pdl_to_pdl_interp::ForEachPosition::ForEachPosition(), mlir::pdl_to_pdl_interp::OperationPosition::get(), getOperationDepth(), getParent(), mlir::pdl_to_pdl_interp::OperationPosition::isOperandDefiningOp(), mlir::pdl_to_pdl_interp::OperandGroupPosition::OperandGroupPosition(), mlir::pdl_to_pdl_interp::OperandPosition::OperandPosition(), mlir::pdl_to_pdl_interp::OperationPosition::OperationPosition(), mlir::pdl_to_pdl_interp::ResultGroupPosition::ResultGroupPosition(), mlir::pdl_to_pdl_interp::ResultPosition::ResultPosition(), mlir::pdl_to_pdl_interp::TypePosition::TypePosition(), and mlir::pdl_to_pdl_interp::UsersPosition::UsersPosition().