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

Adrian Prantl aprantl at apple.com
Tue Oct 15 11:35:33 PDT 2013


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Debug-info-Reduce-the-amount-of-redundant-debug-info.patch
Type: application/octet-stream
Size: 5894 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131015/610077a9/attachment.obj>


More information about the llvm-commits mailing list