[DebugInfo][InstrRef][NFC] Refactor ahead of further optimisations
authorJeremy Morse <jeremy.morse@sony.com>
Mon, 31 Jan 2022 16:24:20 +0000 (16:24 +0000)
committerJeremy Morse <jeremy.morse@sony.com>
Mon, 31 Jan 2022 16:45:53 +0000 (16:45 +0000)
commit4a2cb01370710a6807e8a18416b5c75f0f73993c
treeaeeb6138c5ad76838539bf90da56386adc6519e3
parentdb8ef9463ce14f7de0e0a9f438b5e91425fba3a3
[DebugInfo][InstrRef][NFC] Refactor ahead of further optimisations

This patch shuffles some functions around so that some blocks of code can
be reused. In particular,
 * Move the determination of "which blocks are in scope" to its own
   function, as it's non-trivial to solve. Delete the "InScopeBlocks"
   collection too, which nothing reads from.
 * Split transfer emission (i.e., installing DBG_VALUEs into blocks) into
   its own function.
 * Name some useful types.
 * Rename "ScopeToBlocks" to "ScopeToAssignBlocks", as that's what the
   collection contains, blocks where assignments happen.

Differential Revision: https://reviews.llvm.org/D118454
llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h