NuriAmari wrote:

> What about an option that just redirects the PrintIRInstrumentation output to 
> files instead of stderr? The files can be something like `$N-$modulename.ll` 
> where `$N` is an int that increments.

Yeah that's more or less what I'm working on now. My plan is:

- Add a flag that provides a directory to write files to
- If that flag is passed, write files of the structure 
`$N-$modulename-$passname-(before|after).ll` into that directory instead of 
writing to stderr
- If you pass both `-print-after=foo` and `-print-before=foo` the dump files 
for a particular run of Foo on a particular unit of IR should match except for 
the before / after suffix.

This should be relatively easy to implement in the old pass manager as well.

https://github.com/llvm/llvm-project/pull/65179
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to