MLIR 22.0.0git
mlir::pdl_to_pdl_interp::BoolNode Struct Reference

A BoolNode denotes a question with a boolean-like result. More...

#include "Conversion/PDLToPDLInterp/PredicateTree.h"

Inheritance diagram for mlir::pdl_to_pdl_interp::BoolNode:

Public Member Functions

 BoolNode (Position *position, Qualifier *question, Qualifier *answer, std::unique_ptr< MatcherNode > successNode, std::unique_ptr< MatcherNode > failureNode=nullptr)
QualifiergetAnswer () const
 Returns the expected answer of this boolean node.
std::unique_ptr< MatcherNode > & getSuccessNode ()
 Returns the node that should be visited on success.
Public Member Functions inherited from mlir::pdl_to_pdl_interp::MatcherNode
virtual ~MatcherNode ()=default
PositiongetPosition () const
 Returns the position on which the question predicate should be checked.
QualifiergetQuestion () const
 Returns the predicate checked on this node.
std::unique_ptr< MatcherNode > & getFailureNode ()
 Returns the node that should be visited if this, or a subsequent node fails.
void setFailureNode (std::unique_ptr< MatcherNode > node)
 Sets the node that should be visited if this, or a subsequent node fails.
TypeID getMatcherTypeID () const
 Returns the unique type ID of this matcher instance.

Static Public Member Functions

static bool classof (const MatcherNode *node)
 Returns if the given matcher node is an instance of this class, used to support type casting.
Static Public Member Functions inherited from mlir::pdl_to_pdl_interp::MatcherNode
static std::unique_ptr< MatcherNodegenerateMatcherTree (ModuleOp module, PredicateBuilder &builder, DenseMap< Value, Position * > &valueToPosition)
 Given a module containing PDL pattern operations, generate a matcher tree using the patterns within the given module and return the root matcher node.

Additional Inherited Members

Protected Member Functions inherited from mlir::pdl_to_pdl_interp::MatcherNode
 MatcherNode (TypeID matcherTypeID, Position *position=nullptr, Qualifier *question=nullptr, std::unique_ptr< MatcherNode > failureNode=nullptr)

Detailed Description

A BoolNode denotes a question with a boolean-like result.

These nodes branch to a single node on a successful result, otherwise defaulting to the failure node.

Definition at line 110 of file PredicateTree.h.

Constructor & Destructor Documentation

◆ BoolNode()

BoolNode::BoolNode ( Position * position,
Qualifier * question,
Qualifier * answer,
std::unique_ptr< MatcherNode > successNode,
std::unique_ptr< MatcherNode > failureNode = nullptr )

Member Function Documentation

◆ classof()

bool mlir::pdl_to_pdl_interp::BoolNode::classof ( const MatcherNode * node)
inlinestatic

Returns if the given matcher node is an instance of this class, used to support type casting.

Definition at line 117 of file PredicateTree.h.

References mlir::TypeID::get(), mlir::pdl_to_pdl_interp::MatcherNode::getMatcherTypeID(), and mlir::pdl_to_pdl_interp::MatcherNode::MatcherNode().

◆ getAnswer()

Qualifier * mlir::pdl_to_pdl_interp::BoolNode::getAnswer ( ) const
inline

Returns the expected answer of this boolean node.

Definition at line 122 of file PredicateTree.h.

◆ getSuccessNode()

std::unique_ptr< MatcherNode > & mlir::pdl_to_pdl_interp::BoolNode::getSuccessNode ( )
inline

Returns the node that should be visited on success.

Definition at line 125 of file PredicateTree.h.


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