[mlir][Pass] Add new FileTreeIRPrinterConfig (#67840)
This change expands the existing instrumentation that prints the IR before/after each pass to an output stream (usually stderr). It adds a new configuration that will print the output of each pass to a separate file. The files will be organized into a directory tree rooted at a specified directory. For existing tools, a CL option `-mlir-print-ir-tree-dir` is added to specify this directory and activate the new printing config. The created directory tree mirrors the nesting structure of the IR. For example, if the IR is congruent to the pass-pipeline "builtin.module(pass1,pass2,func.func(pass3,pass4),pass5)", and `-mlir-print-ir-tree-dir=/tmp/pipeline_output`, then then the tree file tree created will look like: ``` /tmp/pass_output ├── builtin_module_the_symbol_name │ ├── 0_pass1.mlir │ ├── 1_pass2.mlir │ ├── 2_pass5.mlir │ ├── func_func_my_func_name │ │ ├── 1_0_pass3....
parent
ab7e6b66
Please register or sign in to comment