<div dir="ltr">Could you attach/paste the IR obtained without your change? I'm curious to see what dbg.values are produced.<br><br>& a little bit of 'asking for a pony' - but is there one specific optimization you could run to demonstrate this problem rather than all of -O2?</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 15, 2013 at 11:35 AM, Adrian Prantl <span dir="ltr"><<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Eric,<br>
<br>
I just wanted to commit this straightforward patch but I realized you might be interested in looking at it first, since it modifies the behavior of LowerDbgDeclare.<br>
We have a testcase where -O2 creates dozens of redundant dbg.values for an alloca that is never promoted to a register. And these dbg.values end up in the debug info as separate entries, because the dbg.value intrinsics are in different lexical scopes. This patch detects one such situation and decides not to lower the dbg.declare when it knows that the alloca cannot be promoted.<br>

<br>
thanks,<br>
Adrian<br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>