<div dir="ltr">There's no way to get a list of passes. Currently the name used to specify a pass, e.g. "instcombine" in -passes=instcombine is mostly a one way street to creating the pass, it's hard to go backwards from a pass to the original name due to the implementation. This could be fixed, but it'd be a fairly large change.<div><br></div><div>Personally I'd prefer an addition to <a href="https://reviews.llvm.org/D86657">https://reviews.llvm.org/D86657</a> where we dump the IR on a crash to a file. Then with -debug-pass-manager, we can see which pass caused the crash. Then use llvm-reduce to reduce the IR, running only that one pass.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 24, 2021 at 1:28 AM Florian Hahn <<a href="mailto:florian_hahn@apple.com" target="_blank">florian_hahn@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> On Feb 15, 2021, at 09:33, Mikael Holmén via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
> <br>
> Hi,<br>
> <br>
> I just wrote a PR about a crash that I only see with the new PM:<br>
> <a href="https://bugs.llvm.org/show_bug.cgi?id=49185" rel="noreferrer" target="_blank">https://bugs.llvm.org/show_bug.cgi?id=49185</a><br>
> <br>
> Normally (with the old PM) when I get a crash with e.g. "opt -O3" I use<br>
> -debug-pass=Arguments to get the list of passes run, and then I usually<br>
> try to reduce the amount of passes with the goal to reach a simpler opt<br>
> command line just running one pass to get a small and stable<br>
> reproducer.<br>
> <br>
> With the new PM I have no idea how to do this. -debug-pass=Arguments<br>
> doesn't do anything, it doesn't give an error either, it's just silent.<br>
> <br>
> What is the intended workflow to reach a proper nice and small<br>
> reproducer that has a minumum of dependencies towards different passes<br>
> with the new PM?<br>
<br>
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.<br>
<br>
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`. <br>
<br>
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.<br>
<br>
Cheers,<br>
Florian</blockquote></div>