[llvm-commits] [llvm] r159020 - /llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Fri Jun 22 11:51:36 PDT 2012
Author: stoklund
Date: Fri Jun 22 13:51:35 2012
New Revision: 159020
URL: http://llvm.org/viewvc/llvm-project?rev=159020&view=rev
Log:
Don't depend on live ranges being present.
DBG_VALUE instructions could be referring to non-existing virtual
registers.
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=159020&r1=159019&r2=159020&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp Fri Jun 22 13:51:35 2012
@@ -642,11 +642,16 @@
// Register locations are constrained to where the register value is live.
if (TargetRegisterInfo::isVirtualRegister(Loc.getReg())) {
- LiveInterval *LI = &LIS.getInterval(Loc.getReg());
- const VNInfo *VNI = LI->getVNInfoAt(Idx);
+ LiveInterval *LI = 0;
+ const VNInfo *VNI = 0;
+ if (LIS.hasInterval(Loc.getReg())) {
+ LI = &LIS.getInterval(Loc.getReg());
+ VNI = LI->getVNInfoAt(Idx);
+ }
SmallVector<SlotIndex, 16> Kills;
extendDef(Idx, LocNo, LI, VNI, &Kills, LIS, MDT, UVS);
- addDefsFromCopies(LI, LocNo, Kills, Defs, MRI, LIS);
+ if (LI)
+ addDefsFromCopies(LI, LocNo, Kills, Defs, MRI, LIS);
continue;
}
More information about the llvm-commits
mailing list