|
MLIR 22.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. | |
| Position * | getParent () const |
| Returns the parent position. The root operation position has no parent. | |
| Predicates::Kind | getKind () const |
| Returns the kind of this position. | |
Protected Attributes | |
| Position * | parent = nullptr |
| Link to the parent position. | |
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.
Referenced by getParent().
|
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 parent.
|
inline |
Returns the parent position. The root operation position has no parent.
Definition at line 153 of file Predicate.h.
References parent, and Position().
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().