[llvm] [mlir] [mlir][core] Add an MLIR "pattern catalog" generator (PR #146228)

Jeremy Kun via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 1 22:26:27 PDT 2025


================
@@ -301,6 +301,17 @@ def find_real_python_interpreter():
             ToolSubst("mlir-opt", "mlir-opt --verify-roundtrip", unresolved="fatal"),
         ]
     )
+elif "MLIR_GENERATE_PATTERN_CATALOG" in os.environ:
+    tools.extend(
+        [
+            ToolSubst(
+                "mlir-opt",
+                "mlir-opt --debug-only=pattern-logging-listener --mlir-disable-threading",
+                unresolved="fatal",
+            ),
+            ToolSubst("FileCheck", "FileCheck --dump-input=always", unresolved="fatal"),
----------------
j2kun wrote:

This and for future proofing against such trickery. I didn't do a detailed analysis of which tests redirect stderr (i.e., if many involve the rewrite engine), but many tests do and so it seems acceptable to account for this.

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


More information about the llvm-commits mailing list