[llvm-dev] How to get from "opt -O3" to "opt <a-single-pass>" with the new PM?

Florian Hahn via llvm-dev llvm-dev at lists.llvm.org
Wed Feb 24 01:28:49 PST 2021



> On Feb 15, 2021, at 09:33, Mikael Holmén via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> Hi,
> 
> I just wrote a PR about a crash that I only see with the new PM:
> https://bugs.llvm.org/show_bug.cgi?id=49185
> 
> Normally (with the old PM) when I get a crash with e.g. "opt -O3" I use
> -debug-pass=Arguments to get the list of passes run, and then I usually
> try to reduce the amount of passes with the goal to reach a simpler opt
> command line just running one pass to get a small and stable
> reproducer.
> 
> With the new PM I have no idea how to do this. -debug-pass=Arguments
> doesn't do anything, it doesn't give an error either, it's just silent.
> 
> What is the intended workflow to reach a proper nice and small
> reproducer that has a minumum of dependencies towards different passes
> with the new PM?

Unfortunately there’s nothing similar to bugpoint’s crashing pass reduction feature that works for the new pass manager at the moment. I am also not aware of anyone working on this.

For the new PM, there’s -debug-pass-manager, which prints the passes that run, but not in a format suitable to feed back to `opt`. 

Arthur, Alina, do you know if there’s a way to get a string of passes that corresponds to a all passes in a given pipeline, which can be passed directly to `opt`? With that, it might also be easier to build a llvm-reduce-based pass reduction tool as well.

Cheers,
Florian


More information about the llvm-dev mailing list