<div dir="ltr">Alright, I will try to come up with a nice way of reducing the list of passes.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Feb 27, 2021 at 12:33 AM Mikael Holmén <<a href="mailto:mikael.holmen@ericsson.com">mikael.holmen@ericsson.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">On Thu, 2021-02-25 at 10:25 +0000, Florian Hahn wrote:<br>
> > On Feb 25, 2021, at 07:03, Mikael Holmén <<br>
> > <a href="mailto:mikael.holmen@ericsson.com" target="_blank">mikael.holmen@ericsson.com</a>> wrote:<br>
> > <br>
> > On Wed, 2021-02-24 at 11:25 -0800, Arthur Eubanks wrote:<br>
> > > There's no way to get a list of passes. Currently the name used<br>
> > > to<br>
> > > specify a pass, e.g. "instcombine" in -passes=instcombine is<br>
> > > mostly a<br>
> > > one way street to creating the pass, it's hard to go backwards<br>
> > > from a<br>
> > > pass to the original name due to the implementation. This could<br>
> > > be<br>
> > > fixed, but it'd be a fairly large change.<br>
> > > <br>
> > > Personally I'd prefer an addition to <br>
> > > <a href="https://protect2.fireeye.com/v1/url?k=b28a4060-ed117a79-b28a00fb-8682aaa22bc0-2fe31fd4ca0dd9ee&q=1&e=71cf8e51-b719-4c90-b79a-9aad4f1804c5&u=https%3A%2F%2Freviews.llvm.org%2FD86657" rel="noreferrer" target="_blank">https://protect2.fireeye.com/v1/url?k=b28a4060-ed117a79-b28a00fb-8682aaa22bc0-2fe31fd4ca0dd9ee&q=1&e=71cf8e51-b719-4c90-b79a-9aad4f1804c5&u=https%3A%2F%2Freviews.llvm.org%2FD86657</a><br>
> > > where we dump the IR on a crash to a file. Then with -debug-pass-<br>
> > > manager, we can see which pass caused the crash. Then use llvm-<br>
> > > reduce to reduce the IR, running only that one pass.<br>
> > > <br>
> > <br>
> > Ok. So more or less the tool we have is -print-before-all -debug-<br>
> > pass-<br>
> > manager and copy/paste the last input and rerun with the last<br>
> > interesting pass. -print-on-crash makes it a little bit more<br>
> > convenient<br>
> > when a pass crashes. I suppose this will work ok in many cases.<br>
> <br>
> Unfortunately this won’t work when the problem is caused by state not<br>
> captured in LLVM IR. E.g. a pass could optimize the MemorySSA for a<br>
> function and then the optimized MemorySSA is used by a subsequent<br>
> pass, which crashes because the optimized MemorySSA enables an<br>
> optimization. If you just use the IR before the crash, the pass will<br>
> use unoptimized MemorySSA and may not crash. There are other analysis<br>
> results that may expose similar effects.<br>
> <br>
> I think we need a way to reduce the passes involved in such<br>
> scenarios.<br>
<br>
+1<br>
<br>
This is what I tried to describe in the <br>
<br>
"Another case is when a number of passes is needed to make a certain<br>
pass expose something interesting."<br>
<br>
case.<br>
<br>
Thanks,<br>
Mikael<br>
> <br>
> Cheers,<br>
> Florian<br>
</blockquote></div>