[llvm-commits] [llvm] r123335 - /llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Wed Jan 12 14:37:49 PST 2011
Author: stoklund
Date: Wed Jan 12 16:37:49 2011
New Revision: 123335
URL: http://llvm.org/viewvc/llvm-project?rev=123335&view=rev
Log:
Sometimes, old virtual registers can linger on DBG_VALUE instructions.
Make sure we don't crash in that case, but simply turn them into %noreg instead.
Modified:
llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp
Modified: llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp?rev=123335&r1=123334&r2=123335&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp Wed Jan 12 16:37:49 2011
@@ -565,7 +565,8 @@
!TargetRegisterInfo::isVirtualRegister(Loc.getReg()))
continue;
unsigned VirtReg = Loc.getReg();
- if (VRM.isAssignedReg(VirtReg)) {
+ if (VRM.isAssignedReg(VirtReg) &&
+ TargetRegisterInfo::isPhysicalRegister(VRM.getPhys(VirtReg))) {
Loc.substPhysReg(VRM.getPhys(VirtReg), TRI);
} else if (VRM.getStackSlot(VirtReg) != VirtRegMap::NO_STACK_SLOT) {
// FIXME: Translate SubIdx to a stackslot offset.
More information about the llvm-commits
mailing list