<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 1:55 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=""><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">My intuition is that you're liable to change the crash (rather than<br class="">
reduce it) when touching arbitrary metadata like this. Particularly<br class="">
with debug info, this stuff is fairly cross-referential, and a `null`<br class="">
reference can have some non-trivial meaning.<br class=""></blockquote><div class=""><br class=""></div><div class="">Well, the idea is that you run the verifier after doing the null replacement.</div><div class="">As long as the Verifier understands the structure of debug info, the only cost</div><div class="">you pay is a slightly longer reduction time.</div></div></div></div>
</div></blockquote>Running the verifier was my solution too.</div><div><br class=""></div><div>I wrote my patch over a year ago, well before Duncan had improved the verifier to the point where it is now. </div><div><br class=""></div><div>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><br class=""></div><div>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><br class=""></div><div>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><br class=""></div><div>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><br class=""></div><div>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><br class=""></div><div>Thanks,</div><div>Pete</div><br class=""></body></html>