MLIR
20.0.0git
|
#include "mlir/TableGen/Pattern.h"
Public Types | |
using | IdentifierLine = std::pair< StringRef, unsigned > |
Public Member Functions | |
Pattern (const llvm::Record *def, RecordOperatorMap *mapper) | |
DagNode | getSourcePattern () const |
int | getNumResultPatterns () const |
DagNode | getResultPattern (unsigned index) const |
void | collectSourcePatternBoundSymbols (SymbolInfoMap &infoMap) |
void | collectResultPatternBoundSymbols (SymbolInfoMap &infoMap) |
const Operator & | getSourceRootOp () |
Operator & | getDialectOp (DagNode node) |
std::vector< AppliedConstraint > | getConstraints () const |
int | getNumSupplementalPatterns () const |
DagNode | getSupplementalPattern (unsigned index) const |
int | getBenefit () const |
std::vector< IdentifierLine > | getLocation () const |
void | collectBoundSymbols (DagNode tree, SymbolInfoMap &infoMap, bool isSrcPattern) |
using mlir::tblgen::Pattern::IdentifierLine = std::pair<StringRef, unsigned> |
|
explicit |
void Pattern::collectBoundSymbols | ( | DagNode | tree, |
SymbolInfoMap & | infoMap, | ||
bool | isSrcPattern | ||
) |
Definition at line 735 of file Pattern.cpp.
References mlir::tblgen::SymbolInfoMap::bindAttr(), mlir::tblgen::SymbolInfoMap::bindOpArgument(), mlir::tblgen::SymbolInfoMap::bindOpResult(), mlir::tblgen::SymbolInfoMap::bindValue(), mlir::tblgen::SymbolInfoMap::bindValues(), mlir::tblgen::DagNode::getArgAsLeaf(), mlir::tblgen::DagNode::getArgAsNestedDag(), mlir::tblgen::DagNode::getArgName(), mlir::tblgen::DagLeaf::getAsConstraint(), getDialectOp(), mlir::tblgen::DagNode::getNumArgs(), mlir::tblgen::DagNode::getNumReturnsOfNativeCode(), mlir::tblgen::DagNode::getSymbol(), mlir::tblgen::DagLeaf::isAttrMatcher(), mlir::tblgen::DagLeaf::isConstantAttr(), mlir::tblgen::DagLeaf::isEnumAttrCase(), mlir::tblgen::DagNode::isNativeCodeCall(), mlir::tblgen::DagNode::isOperation(), and mlir::tblgen::DagLeaf::isUnspecified().
Referenced by collectResultPatternBoundSymbols(), and collectSourcePatternBoundSymbols().
void Pattern::collectResultPatternBoundSymbols | ( | SymbolInfoMap & | infoMap | ) |
Definition at line 648 of file Pattern.cpp.
References collectBoundSymbols(), getNumResultPatterns(), and getResultPattern().
void Pattern::collectSourcePatternBoundSymbols | ( | SymbolInfoMap & | infoMap | ) |
Definition at line 638 of file Pattern.cpp.
References mlir::tblgen::SymbolInfoMap::assignUniqueAlternativeNames(), collectBoundSymbols(), and getSourcePattern().
int mlir::tblgen::Pattern::getBenefit | ( | ) | const |
std::vector< AppliedConstraint > Pattern::getConstraints | ( | ) | const |
Definition at line 665 of file Pattern.cpp.
Definition at line 661 of file Pattern.cpp.
References mlir::tblgen::DagNode::getDialectOp().
Referenced by collectBoundSymbols().
std::vector< Pattern::IdentifierLine > Pattern::getLocation | ( | ) | const |
Definition at line 715 of file Pattern.cpp.
int Pattern::getNumResultPatterns | ( | ) | const |
Definition at line 628 of file Pattern.cpp.
Referenced by collectResultPatternBoundSymbols().
int Pattern::getNumSupplementalPatterns | ( | ) | const |
Definition at line 693 of file Pattern.cpp.
DagNode Pattern::getResultPattern | ( | unsigned | index | ) | const |
Definition at line 633 of file Pattern.cpp.
Referenced by collectResultPatternBoundSymbols().
DagNode Pattern::getSourcePattern | ( | ) | const |
Definition at line 624 of file Pattern.cpp.
Referenced by collectSourcePatternBoundSymbols(), and getSourceRootOp().
const Operator & Pattern::getSourceRootOp | ( | ) |
Definition at line 657 of file Pattern.cpp.
References mlir::tblgen::DagNode::getDialectOp(), and getSourcePattern().
DagNode Pattern::getSupplementalPattern | ( | unsigned | index | ) | const |
Definition at line 698 of file Pattern.cpp.