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

via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 29 21:51:43 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r HEAD~1...HEAD mlir/test/lit.cfg.py
``````````

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- lit.cfg.py	2025-06-30 04:48:32.000000 +0000
+++ lit.cfg.py	2025-06-30 04:51:16.136296 +0000
@@ -300,22 +300,20 @@
         [
             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=generate-pattern-catalog --mlir-disable-threading",
-            unresolved="fatal"
-        ),
-        ToolSubst(
-            "FileCheck",
-            "FileCheck --dump-input=always",
-            unresolved="fatal"
-        ),
-    ])
+    tools.extend(
+        [
+            ToolSubst(
+                "mlir-opt",
+                "mlir-opt --debug-only=generate-pattern-catalog --mlir-disable-threading",
+                unresolved="fatal",
+            ),
+            ToolSubst("FileCheck", "FileCheck --dump-input=always", unresolved="fatal"),
+        ]
+    )
 else:
     tools.extend(["mlir-opt"])
 
 llvm_config.add_tool_substitutions(tools, tool_dirs)
 

``````````

</details>


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


More information about the llvm-commits mailing list