MLIR 22.0.0git
mlir::pdl_to_pdl_interp::Position Class Reference

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"

Inheritance diagram for mlir::pdl_to_pdl_interp::Position:

Public Member Functions

 Position (Predicates::Kind kind)
virtual ~Position ()
unsigned getOperationDepth () const
 Returns the depth of the first ancestor operation position.
PositiongetParent () const
 Returns the parent position. The root operation position has no parent.
Predicates::Kind getKind () const
 Returns the kind of this position.

Protected Attributes

Positionparent = nullptr
 Link to the parent position.

Additional Inherited Members

Protected Member Functions inherited from mlir::StorageUniquer::BaseStorage
 BaseStorage ()=default

Detailed Description

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.

Constructor & Destructor Documentation

◆ Position()

mlir::pdl_to_pdl_interp::Position::Position ( Predicates::Kind kind)
inlineexplicit

Definition at line 146 of file Predicate.h.

Referenced by getParent().

◆ ~Position()

Position::~Position ( )
virtualdefault

Member Function Documentation

◆ getKind()

Predicates::Kind mlir::pdl_to_pdl_interp::Position::getKind ( ) const
inline

Returns the kind of this position.

Definition at line 156 of file Predicate.h.

◆ getOperationDepth()

unsigned Position::getOperationDepth ( ) const

Returns the depth of the first ancestor operation position.

Definition at line 21 of file Predicate.cpp.

References parent.

◆ getParent()

Position * mlir::pdl_to_pdl_interp::Position::getParent ( ) const
inline

Returns the parent position. The root operation position has no parent.

Definition at line 153 of file Predicate.h.

References parent, and Position().

Member Data Documentation

◆ parent


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