]> granicus.if.org Git - llvm/commit
[DebugInfo] Avoid dropping location info across block boundaries
authorJeremy Morse <jeremy.morse.llvm@gmail.com>
Wed, 21 Aug 2019 09:22:31 +0000 (09:22 +0000)
committerJeremy Morse <jeremy.morse.llvm@gmail.com>
Wed, 21 Aug 2019 09:22:31 +0000 (09:22 +0000)
commitcaa2044883a8bfc2de73f2fdd8e3acbe7693506a
tree939d0af15ce2ada3fa9eff06de5c06208d3078b6
parent1338c14d0676434da021911c8824f00425d4895d
[DebugInfo] Avoid dropping location info across block boundaries

LiveDebugValues propagates variable locations between blocks by creating
new DBG_VALUE insts in the successors, then interpreting them when it
passes back through the block at a later time. However, this flushes out
any extra information about the location that LiveDebugValues holds: for
example, connections between variable locations such as discussed in
D65368. And as reported in PR42772 this causes us to lose track of the
fact that a spill-location is actually a spill, not a register location.

This patch fixes that by deferring the creation of propagated DBG_VALUEs
until after propagation has completed: instead location propagation occurs
only by sharing location ID numbers between blocks.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369508 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/LiveDebugValues.cpp
test/DebugInfo/MIR/X86/live-debug-values-restore.mir