[PATCH] D85760: [DebugInstrRef][7/9] NFC: Separate collection of machine/variable values
Jeremy Morse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 11 10:56:23 PDT 2020
jmorse created this revision.
jmorse added a reviewer: debug-info.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
jmorse requested review of this revision.
This patch adjusts _when_ something happens in LiveDebugValues / InstrRefBasedLDV, to make it more amenable to dealing with DBG_INSTR_REF instructions. There's no functional change.
In the current base InstrRefBasedLDV implementation, we collect the machine value-number transfer function for blocks at the same time as the variable-value transfer function. After solving machine value numbers, the variable-value transfer function is updated so that DBG_VALUEs of live-in registers have the correct value. The same would need to be done for DBG_INSTR_REFs, to connect instruction-references with machine value numbers.
Rather than writing more code for that, this patch makes things slightly simpler:
- We collect the (machine-value-number) transfer function and solve for machine value numbers,
- Then step through the MachineInstrs again collecting the variable value transfer function.
The change is that linking up variable values with how they're defined (as being in a register, or as an instruction reference) is done as we step through the MachineInstrs, instead of on-the-fly. This is slower (in terms of compile time performance) but makes the next patch much easier to understand.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D85760
Files:
llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85760.284810.patch
Type: text/x-patch
Size: 4548 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200811/19438925/attachment.bin>
More information about the llvm-commits
mailing list