MLIR
20.0.0git
|
This class represents the base of a predicate matcher node. More...
#include "Conversion/PDLToPDLInterp/PredicateTree.h"
Public Member Functions | |
virtual | ~MatcherNode ()=default |
Position * | getPosition () const |
Returns the position on which the question predicate should be checked. More... | |
Qualifier * | getQuestion () const |
Returns the predicate checked on this node. More... | |
std::unique_ptr< MatcherNode > & | getFailureNode () |
Returns the node that should be visited if this, or a subsequent node fails. More... | |
void | setFailureNode (std::unique_ptr< MatcherNode > node) |
Sets the node that should be visited if this, or a subsequent node fails. More... | |
TypeID | getMatcherTypeID () const |
Returns the unique type ID of this matcher instance. More... | |
Static Public Member Functions | |
static std::unique_ptr< MatcherNode > | generateMatcherTree (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. More... | |
Protected Member Functions | |
MatcherNode (TypeID matcherTypeID, Position *position=nullptr, Qualifier *question=nullptr, std::unique_ptr< MatcherNode > failureNode=nullptr) | |
This class represents the base of a predicate matcher node.
Definition at line 50 of file PredicateTree.h.
|
virtualdefault |
|
protected |
Definition at line 1040 of file PredicateTree.cpp.
|
static |
Given a module containing PDL pattern operations, generate a matcher tree using the patterns within the given module and return the root matcher node.
valueToPosition
is a map that is populated with the original pdl values and their corresponding positions in the matcher tree.
A pattern.
A root of the pattern chosen among the candidate roots in pdl.rewrite.
The extracted predicates for this pattern and root.
Definition at line 944 of file PredicateTree.cpp.
References buildPredicateList(), dependsOn(), foldSwitchToBool(), insertExitNode(), propagatePattern(), and stableTopologicalSort().
|
inline |
Returns the node that should be visited if this, or a subsequent node fails.
Definition at line 70 of file PredicateTree.h.
|
inline |
Returns the unique type ID of this matcher instance.
This should not be used directly, and is provided to support type casting.
Definition at line 79 of file PredicateTree.h.
Referenced by mlir::pdl_to_pdl_interp::BoolNode::classof(), mlir::pdl_to_pdl_interp::ExitNode::classof(), mlir::pdl_to_pdl_interp::SuccessNode::classof(), and mlir::pdl_to_pdl_interp::SwitchNode::classof().
|
inline |
Returns the position on which the question predicate should be checked.
Definition at line 63 of file PredicateTree.h.
Referenced by isSamePredicate().
|
inline |
Returns the predicate checked on this node.
Definition at line 66 of file PredicateTree.h.
Referenced by isSamePredicate().
|
inline |
Sets the node that should be visited if this, or a subsequent node fails.
Definition at line 73 of file PredicateTree.h.