14 #ifndef MLIR_TOOLS_MLIRQUERY_MATCHER_MATCHERFINDER_H
15 #define MLIR_TOOLS_MLIRQUERY_MATCHER_MATCHERFINDER_H
20 #include "llvm/ADT/SetVector.h"
52 const std::string &binding)
const;
55 std::vector<Operation *>
Operation is the basic unit of execution within MLIR.
Finds and collects matches from the IR.
void printMatch(llvm::raw_ostream &os, QuerySession &qs, Operation *op) const
Prints the matched operation.
std::vector< MatchResult > collectMatches(Operation *root, DynMatcher matcher) const
Traverses the IR and returns a vector of MatchResult for each match of the matcher.
std::vector< Operation * > flattenMatchedOps(std::vector< MatchResult > &matches) const
Flattens a vector of MatchResult into a vector of operations.
Computes the backward-slice of all transitive defs reachable from rootOp, if innerMatcher matches.
A subclass which preserves the matching information.
std::vector< Operation * > matchedOps
Contains the matching environment.