diff options
author | Jeremy Morse <jeremy.morse@sony.com> | 2021-10-18 11:37:51 +0100 |
---|---|---|
committer | Jeremy Morse <jeremy.morse@sony.com> | 2021-10-18 11:52:45 +0100 |
commit | c4ede6d60892a5101d159b4876ad76fc8eefc837 (patch) | |
tree | 60f282b78328d09cbd6a889eecedcb773319bab1 /llvm/lib/Transforms/Utils/Local.cpp | |
parent | d8bc7e40ce1cdd8c1a3fac7937ce1ea85c262728 (diff) | |
download | llvm-c4ede6d60892a5101d159b4876ad76fc8eefc837.zip llvm-c4ede6d60892a5101d159b4876ad76fc8eefc837.tar.gz llvm-c4ede6d60892a5101d159b4876ad76fc8eefc837.tar.bz2 |
[DebugInfo][InstrRef] Avoid a crash during DBG_PHI maintenence
With D110105, the isDebug flag for register uses is now a proxy for whether
the instruction is a debug instruction; that causes DBG_PHIs to have their
operands updated by calls to updateDbgUsersToReg, which is the correct
behaviour. However: that function only expects to receive DBG_VALUE
instructions and asserts such.
This patch splits the updating-action into a lambda, and applies it to the
appropriate operands for each kind of debug instruction. Tested with an
ARM test that stimulates this function: I've added some DBG_PHI
instructions that should be updated in the same way as DBG_VALUEs.
Differential Revision: https://reviews.llvm.org/D108641
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
0 files changed, 0 insertions, 0 deletions