]> granicus.if.org Git - llvm/commit
[DebugInfo] Handle complex expressions with spills in LiveDebugValues
authorJeremy Morse <jeremy.morse.llvm@gmail.com>
Fri, 16 Aug 2019 10:04:17 +0000 (10:04 +0000)
committerJeremy Morse <jeremy.morse.llvm@gmail.com>
Fri, 16 Aug 2019 10:04:17 +0000 (10:04 +0000)
commit1375c53904af0cadb5bf552226fdc02b3e170227
treeb1b1a9f15f18ceaef66f320d83b2e71541324f64
parenta7b201b7469566090c281f46634765a13efb6a16
[DebugInfo] Handle complex expressions with spills in LiveDebugValues

In r369026 we disabled spill-recognition in LiveDebugValues for anything
that has a complex expression. This is because it's hard to recover the
complex expression once the spill location is baked into it.

This patch re-enables spill-recognition and slightly adjusts the DBG_VALUE
insts that LiveDebugValues tracks: instead of tracking the last DBG_VALUE
for a variable, it tracks the last _unspilt_ DBG_VALUE. The spill-restore
code is then able to access and copy the original complex expression; but
the rest of LiveDebugValues has to be aware of the slight semantic shift,
and produce a new spilt location if a spilt location is propagated between
blocks.

The test added produces an incorrect variable location (see FIXME), which
will be the subject of future work.

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

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