[Mlir-commits] [mlir] [mlir] MLIR-QUERY DefinitionsMatcher implementation & DAG (PR #115670)

Denzel-Brian Budii llvmlistbot at llvm.org
Fri Jan 10 04:05:34 PST 2025


================
@@ -59,15 +59,15 @@ struct NameOpMatcher {
   NameOpMatcher(StringRef name) : name(name) {}
   bool match(Operation *op) { return op->getName().getStringRef() == name; }
 
-  StringRef name;
+  std::string name;
----------------
chios202 wrote:

This change was necessary due to a bug I found while implementing the LetQuery. If one used hasOpName("arith.mulf") it would work just fine, but when used `let myMatch hasOpName("arith.mulf")` there was a dangling reference when the query was insterted into the `namedValues `container

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


More information about the Mlir-commits mailing list