Closed giuseros closed 2 years ago
It should be easy to have a Transformation
subclass that is parameterized by the filename at creation time and just prints the module to that file without transforming it. Then mimic the print_ir
helper to inject such transformations in any existing pipeline if desired. This has the extra benefit of being able to add such a transformation at selected points instead of all-or-nothing behavior.
I am wary of adding this to the harness itself, similarly to (now not) having the three "print IR" flags, as it will likely lead to a behemothic configuration mechanism instead of a simple tool.
I added this, closing this issue
This stemmed from the discussion here: https://github.com/google/iree-llvm-sandbox/pull/83#discussion_r763689396
The idea is to optionally save each pass result in a separate file, mainly for ease of use. Also each file should contain (as a comment) the entire
mlir-proto-opt
command to reproduce the IR