[DebugInfo][NFCI] Split salvageDebugInfo into helper functions
authorJeremy Morse <jeremy.morse.llvm@gmail.com>
Tue, 5 Feb 2019 11:11:28 +0000 (11:11 +0000)
committerJeremy Morse <jeremy.morse.llvm@gmail.com>
Tue, 5 Feb 2019 11:11:28 +0000 (11:11 +0000)
commit84ca706be1dba3b9a7eb10a3620dfd13f089907e
tree8a304e1d92f58578297ce3f036ff80121d08f4c6
parent72798954544f46111a106c44b26e5ad8b77bbd05
[DebugInfo][NFCI] Split salvageDebugInfo into helper functions

Some use cases are appearing where salvaging is needed that does not
correspond to an instruction being deleted -- for example an instruction
being sunk, or a Value not being available in a block being isel'd.

Enable more fine grained control over how salavging occurs by splitting
the logic into helper functions, separating things that are specific to
working on DbgVariableIntrinsics from those specific to interpreting IR
and building DIExpressions.

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

llvm-svn: 353156
llvm/include/llvm/Transforms/Utils/Local.h
llvm/lib/Transforms/Utils/Local.cpp