<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Oct 24, 2018, at 1:08 PM, Reid Kleckner <<a href="mailto:rnk@google.com" class="">rnk@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div dir="ltr" class="">On Wed, Oct 24, 2018 at 12:32 PM Chris Lattner <<a href="mailto:clattner@nondot.org" class="">clattner@nondot.org</a>> wrote:<br 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;line-break:after-white-space" class=""><div class=""><div class="">One other random thought: how many of these llvm.dbg.* are directly adjacent to each other?  It would be very simple to extend llvm.dbg.value/declare to be a *list* of declarations.  If many of these are next to each other (or are close enough, e.g. simple casts between them) then you could keep the per-instruction design and get the vast majority of the win.  This would be super incremental.</div></div></div></blockquote><div class=""><br class=""></div><div class="">Yep, the stat I came up with to quantify that was that 52% of dbg.values come in runs of length 8 or greater for this test case. The "variadic" dbg.value idea is good, and it's come up at past BoFs and socials. I think it captures 90% of the efficiency gains in this proposal, </div></div></div></div></blockquote><div><br class=""></div></div><div class="">Makes sense, it would be great if someone could prototype it and see how much it helps in practice.  It seems like it would be a huge (and low hanging!) win.</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class="gmail_quote"><div class="">but doesn't eliminate the bug class of "-g inserts dbg.values that change -O2 codegen".</div></div></div></blockquote></div><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""><br class=""></div><div class="">Unless you’re planning to change *all* of the debug intrinsics, I don’t think your proposal addresses this either.</div><div class=""><br class=""></div><div class="">-Chris</div><div class=""><br class=""></div></div></div></div></body></html>