aboutsummaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse.llvm@gmail.com>2019-02-13 10:54:53 +0000
committerJeremy Morse <jeremy.morse.llvm@gmail.com>2019-02-13 10:54:53 +0000
commitb902ab171c3c46f61e4485717b046609956f386b (patch)
tree6800b42127ede8eead1527f03f967da87fa6971b /include/llvm
parentf37f383fd3d7ee4243c66ed33344e6ee01e41d5d (diff)
downloadllvm-b902ab171c3c46f61e4485717b046609956f386b.tar.gz
[DebugInfo][InstCombine] Prefer to salvage debuginfo over sinking it
When instcombine sinks an instruction between two basic blocks, it sinks any dbg.value users in the source block with it, to prevent debug use-before-free. However we can do better by attempting to salvage the debug users, which would avoid moving where the variable location changes. If we successfully salvage, still sink a (cloned) dbg.value with the sunk instruction, as the sunk instruction is more likely to be "live" later in the compilation process. If we can't salvage dbg.value users of a sunk instruction, mark the dbg.values in the original block as being undef. This terminates any earlier variable location range, and represents the fact that we've optimized out the variable location for a portion of the program. Differential Revision: https://reviews.llvm.org/D56788 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353936 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
0 files changed, 0 insertions, 0 deletions