[DebugInfo][InstrRef] Honour too-much-debug-info cutouts
authorJeremy Morse <jeremy.morse@sony.com>
Mon, 16 Aug 2021 13:46:52 +0000 (14:46 +0100)
committerJeremy Morse <jeremy.morse@sony.com>
Mon, 16 Aug 2021 14:06:40 +0000 (15:06 +0100)
commit54a61c94f932f894f2695e0c18bb288d2d1407b7
tree35f63262ac08e39b47b37bfdca0ddf60db34b748
parentd3fdbda6b06884fe5c5b80f0099777d84e9287ff
[DebugInfo][InstrRef] Honour too-much-debug-info cutouts

VarLoc based LiveDebugValues will abandon variable location propagation if
there are too many blocks and variable assignments in the function. If it
didn't, and we had (say) 1000 blocks and 1000 variables in scope, we'd end
up with 1 million DBG_VALUEs just at the start of blocks.

Instruction-referencing LiveDebugValues should honour this limitation too
(because the same limitation applies to it). Hoist the relevant command
line options into LiveDebugValues.cpp and pass it down into the
implementation classes as an argument to ExtendRanges. I've duplicated all
the run-lines in live-debug-values-cutoffs.mir to have an
instruction-referencing flavour.

Differential Revision: https://reviews.llvm.org/D107823
llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
llvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.cpp
llvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.h
llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
llvm/test/DebugInfo/MIR/X86/live-debug-values-cutoffs.mir