[DebugInfo][InstrRef] Track variable assignments in out-of-scope blocks
authorJeremy Morse <jeremy.morse@sony.com>
Thu, 25 Nov 2021 14:46:34 +0000 (14:46 +0000)
committerJeremy Morse <jeremy.morse@sony.com>
Thu, 25 Nov 2021 14:52:11 +0000 (14:52 +0000)
commit102d2a8a99057b2f54ca97661f862e33d055171a
tree0e46cfb53d777632b9db8883851cbdc33e0ee854
parente6cca3125dec12fd4d2ac2cd8081a9b7654dbc93
[DebugInfo][InstrRef] Track variable assignments in out-of-scope blocks

DBG_INSTR_REF's and  DBG_VALUE's can end up in blocks that aren't in the
lexical scope of their variable. It's arguable as to what we should do
about this, however VarLocBasedLDV permits such variable locations to be
propagated, so let's allow it in InstrRefBasedLDV.

It's necessary for the modified test to work.

Differential Revision: https://reviews.llvm.org/D114578
llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
llvm/test/DebugInfo/X86/stack-value-dwarf2.ll