[PATCH] LowerDbgDeclare - get rid of redundant dbg.values when an alloca survives optimization

David Blaikie dblaikie at gmail.com
Tue Oct 15 11:42:17 PDT 2013


Could you attach/paste the IR obtained without your change? I'm curious to
see what dbg.values are produced.

& 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?


On Tue, Oct 15, 2013 at 11:35 AM, Adrian Prantl <aprantl at apple.com> wrote:

> Hi Eric,
>
> 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.
> 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.
>
> thanks,
> Adrian
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131015/1c549aa4/attachment.html>


More information about the llvm-commits mailing list