[Mlir-commits] [mlir] [mlir] MLIR-QUERY slice-matchers implementation (PR #115670)

Denzel-Brian Budii llvmlistbot at llvm.org
Sun Feb 23 07:20:17 PST 2025


================
@@ -10,28 +9,53 @@
 //
 // Matchers are methods that return a Matcher which provides a method
 // match(Operation *op)
+// match(Operation *op, SetVector<Operation *> &matchedOps, QueryOptions
+// &options)
 //
 // The matcher functions are defined in include/mlir/IR/Matchers.h.
 // This file contains the wrapper classes needed to construct matchers for
 // mlir-query.
 //
 //===----------------------------------------------------------------------===//
-
 #ifndef MLIR_TOOLS_MLIRQUERY_MATCHER_MATCHERSINTERNAL_H
 #define MLIR_TOOLS_MLIRQUERY_MATCHER_MATCHERSINTERNAL_H
 
 #include "mlir/IR/Matchers.h"
 #include "llvm/ADT/IntrusiveRefCntPtr.h"
 
+namespace mlir {
+namespace query {
+struct QueryOptions;
+}
+} // namespace mlir
+
 namespace mlir::query::matcher {
+template <typename T, typename = void>
+struct has_simple_match : std::false_type {};
+
+template <typename T>
+struct has_simple_match<T, std::void_t<decltype(std::declval<T>().match(
----------------
chios202 wrote:

Done :)

https://github.com/llvm/llvm-project/pull/115670


More information about the Mlir-commits mailing list