OSDN Git Service

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)
commit550359cb2f9303bddf6c5f5b995bc1290d42e470
tree643711a96a63b3a6e1ce2b9e2a8720851e85dde1
parentbb0606e8def04945d501fa6c8907bc9f8dfede32
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302461 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
test/CodeGen/X86/2012-11-30-misched-dbg.ll [deleted file]
test/CodeGen/X86/2012-11-30-regpres-dbg.ll [deleted file]
test/DebugInfo/COFF/local-variables.ll