<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 11, 2016, at 2:17 PM, Keno Fischer <<a href="mailto:kfischer@college.harvard.edu" class="">kfischer@college.harvard.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class="">Running the verifier was my solution too.</div><div class=""><br class=""></div><div class="">I wrote my patch over a year ago, well before Duncan had improved the verifier to the point where it is now.  </div><div class=""><br class=""></div><div class="">I found that reducing the debug info metadata for all of llc in a single bc was enough to crash the backend because of mismatches between the asserts in DwarfDebug.cpp and the verifier.  I took a quick look and the verifier seems much more comprehensive now so I’d expect any fallout from this to be easy enough to improve the verifier.</div></div></blockquote><div class=""><br class=""></div><div class="">I ran some fairly big bc files through this and it worked fine, but I would be happy to run some more test cases. How were you running it on the llc .bc, i.e. what crash were you looking for?</div></div></div></div></div></blockquote>Unfortunately it was too long ago to remember what I was testing.  I may even have been testing a non-debug info failure and just got frustrated to see debug info in the test case.  Just can’t remember.</div><div><br class=""></div><div>Thats great you’ve done some large binaries though.  I’d expect you’d have triggered some bad asserts by now if there was anything critically missing from the debug info verifier.<br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class="">If you’re curious, my solution did involve knowing more about the format of the debug info its.  I reduced each of the fields of the compile unit (types, enums, imports, etc) all the way to empty arrays if possible.  Then once the CU entries were 0, I could also remove references to the debug info from instructions, and try to get to a small number of references from instructions or the remaining entries in the compile unit.  It seemed to work pretty reasonably.</div><div class=""><br class=""></div><div class="">I believe Adrian’s approach was to look for multiple compile units and remove whole compile units first.  That is a huge win on LTO where you may be able to remove all but the bad compile unit.</div></div></blockquote><div class=""><br class=""></div><div class="">Do note that I already wrote some code a while back to drop the arguments of named metadata, which does a pretty good job of getting rid of whole compile units which are not needed to reproduce the crash. That pass runs before getting to to this.</div></div></div></div></div></blockquote>I didn’t know that.  Thats excellent.  This should great help reduce what metadata is remaining.</div><div><br class=""></div><div>Thanks,</div><div>Pete<br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""></div><div class="">My code is well out of date, so i wouldn’t suggest we revisit it, but its interesting to see the alternative approach.</div><div class=""><br class=""></div><div class="">As for the patch itself, i’ll take a look in phab.  Don’t want to confuse things with email comments on the code itself.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Pete</div><br class=""></div></blockquote></div><br class=""></div></div>
</div></blockquote></div><br class=""></body></html>