[llvm] [mlir] [mlir][core] Add an MLIR "pattern catalog" generator (PR #146228)
Jeremy Kun via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 28 14:33:31 PDT 2025
j2kun wrote:
> I support this with every fiber of my being! Bravo.
>
> My only comment (aside from `getDebugName`) is that it shouldn't mess with the filesystem and it should just dump to the screen. If you put the impl into it's own cpp file and then do `
> #define DEBUG_TYPE "pattern-catalog"`, then people will be able to produce the catalog by just doing `debug-only=pattern-catalog` and piping (eg to a file on disk or whatever).
I had originally tried something like this, and my obstacle was that I couldn't get the test suite to produce useful outputs because stuff was piped to FileCheck (when I tried just dumping to llvm::outs()), and I didn't have a way to modify the RUN command of all the lit tests in a systematic/pragmatic way to add a debug-only flag.
https://github.com/llvm/llvm-project/pull/146228
More information about the llvm-commits
mailing list