aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopVersioning.cpp
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse@sony.com>2021-06-02 15:14:37 +0100
committerJeremy Morse <jeremy.morse@sony.com>2021-07-06 18:31:38 +0100
commit2b2ffb7bdc21bce33372fdd02571b94c2a5e774a (patch)
tree6a33f140587104f1cc45830c02875f0194b15176 /llvm/lib/Transforms/Utils/LoopVersioning.cpp
parent2b5e53111a24eebaa025d12832380638cb0598a1 (diff)
downloadllvm-2b2ffb7bdc21bce33372fdd02571b94c2a5e774a.zip
llvm-2b2ffb7bdc21bce33372fdd02571b94c2a5e774a.tar.gz
llvm-2b2ffb7bdc21bce33372fdd02571b94c2a5e774a.tar.bz2
[DebugInfo][InstrRef][3/4] Produce DBG_INSTR_REFs for all variable locations
This patch emits DBG_INSTR_REFs for two remaining flavours of variable locations that weren't supported: copies, and inter-block VRegs. There are still some locations that must be represented by DBG_VALUE such as constants, but they're mostly independent of optimisations. For variable locations that refer to values defined in different blocks, vregs are allocated before isel begins, but the defining instruction might not exist until late in isel. To get around this, emit DBG_INSTR_REFs in a "half done" state, where the first operand refers to a VReg. Then at the end of isel, patch these back up to refer to instructions, using the finalizeDebugInstrRefs method. Copies are something that I complained about the original RFC, and I really don't want to have to put instruction numbers on copies. They don't define a value: they move them. To address this isel, salvageCopySSA interprets: * COPYs, * SUBREG_TO_REG, * Anything that isCopyInstr thinks is a copy. And follows chains of copies back to the defining instruction that they read from. This relies on any physical registers that COPYs read being defined in the same block, or being entry-block arguments. For the former we can put an instruction number on the defining instruction; for the latter we can drop a DBG_PHI that reads the incoming value. Differential Revision: https://reviews.llvm.org/D88896
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopVersioning.cpp')
0 files changed, 0 insertions, 0 deletions