Don't add DBG_VALUE instructions for static allocas in dbg.declare
authorReid Kleckner <rnk@google.com>
Mon, 8 May 2017 19:58:15 +0000 (19:58 +0000)
committerReid Kleckner <rnk@google.com>
Mon, 8 May 2017 19:58:15 +0000 (19:58 +0000)
commitbf828eedb419326b32e67eef3100d8174f48fac2
treee3ee9f58c40e973dfff3fec34989b226b3444708
parentd9c9f084e28550b92463e6a6d04542b44f52cf54
Don't add DBG_VALUE instructions for static allocas in dbg.declare

Summary:
An llvm.dbg.declare of a static alloca is always added to the
MachineFunction dbg variable map, so these values are entirely
redundant. They survive all the way through codegen to be ignored by
DWARF emission.

Effectively revert r113967

Two bugpoint-reduced test cases from 2012 broke as a result of this
change. Despite my best efforts, I haven't been able to rewrite the test
case using dbg.value. I'm not too concerned about the lost coverage
because these were reduced from the test-suite, which we still run.

Reviewers: aprantl, dblaikie

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D32920

llvm-svn: 302461
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/test/CodeGen/X86/2012-11-30-misched-dbg.ll [deleted file]
llvm/test/CodeGen/X86/2012-11-30-regpres-dbg.ll [deleted file]
llvm/test/DebugInfo/COFF/local-variables.ll