Reapply "[DebugInfo] Fix updateDbgUsersToReg to support DBG_VALUE_LIST"
authorStephen Tozer <Stephen.Tozer@Sony.com>
Mon, 10 May 2021 13:00:01 +0000 (14:00 +0100)
committerStephen Tozer <Stephen.Tozer@Sony.com>
Wed, 12 May 2021 09:19:57 +0000 (10:19 +0100)
commitfdb055f4f139e225884109fbffa275bd3eb3d3b9
tree60d2dc30eb6c54a6a2e3c2542cd1038a4c9f44e6
parent5af3a6645f38e5638b4ba03613ee18140f36962d
Reapply "[DebugInfo] Fix updateDbgUsersToReg to support DBG_VALUE_LIST"

Previous crashes caused by this patch were the result of machine
subregisters being incorrectly handled in updateDbgUsersToReg; this has
been fixed by using RegUnits to determine overlapping registers, instead
of using the register values directly.

Differential Revision: https://reviews.llvm.org/D101523

This reverts commit 7ca26c5fa2df253878cab22e1e2f0d6f1b481218.
llvm/include/llvm/CodeGen/MachineRegisterInfo.h
llvm/lib/CodeGen/MachineCopyPropagation.cpp
llvm/test/DebugInfo/ARM/machine-cp-updates-dbg-reg.mir [new file with mode: 0644]