[all-commits] [llvm/llvm-project] c4ede6: [DebugInfo][InstrRef] Avoid a crash during DBG_PHI...
Jeremy Morse via All-commits
all-commits at lists.llvm.org
Mon Oct 18 03:53:16 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c4ede6d60892a5101d159b4876ad76fc8eefc837
https://github.com/llvm/llvm-project/commit/c4ede6d60892a5101d159b4876ad76fc8eefc837
Author: Jeremy Morse <jeremy.morse at sony.com>
Date: 2021-10-18 (Mon, 18 Oct 2021)
Changed paths:
M llvm/include/llvm/CodeGen/MachineRegisterInfo.h
M llvm/test/DebugInfo/ARM/machine-cp-updates-dbg-reg.mir
Log Message:
-----------
[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
More information about the All-commits
mailing list