From 086723d244952aee690a8aa39485a0fa0d3a7700 Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Wed, 2 Jun 2010 15:29:36 +0000 Subject: [PATCH] Not all entries in the range will have an SUnit. Check for that when looking for debug information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105324 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AggressiveAntiDepBreaker.cpp | 1 + lib/CodeGen/CriticalAntiDepBreaker.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/CodeGen/AggressiveAntiDepBreaker.cpp b/lib/CodeGen/AggressiveAntiDepBreaker.cpp index 84b226b3d0f..727e8f9628d 100644 --- a/lib/CodeGen/AggressiveAntiDepBreaker.cpp +++ b/lib/CodeGen/AggressiveAntiDepBreaker.cpp @@ -909,6 +909,7 @@ unsigned AggressiveAntiDepBreaker::BreakAntiDependencies( // information related to the anti-dependency register, make // sure to update that as well. const SUnit *SU = MISUnitMap[Q->second.Operand->getParent()]; + if (!SU) continue; for (unsigned i = 0, e = SU->DbgInstrList.size() ; i < e ; ++i) { MachineInstr *DI = SU->DbgInstrList[i]; assert (DI->getNumOperands()==3 && DI->getOperand(0).isReg() && diff --git a/lib/CodeGen/CriticalAntiDepBreaker.cpp b/lib/CodeGen/CriticalAntiDepBreaker.cpp index 5eabe655704..42cc44812de 100644 --- a/lib/CodeGen/CriticalAntiDepBreaker.cpp +++ b/lib/CodeGen/CriticalAntiDepBreaker.cpp @@ -530,6 +530,7 @@ BreakAntiDependencies(const std::vector& SUnits, // related to the anti-dependency register, make sure to update that // as well. const SUnit *SU = MISUnitMap[Q->second->getParent()]; + if (!SU) continue; for (unsigned i = 0, e = SU->DbgInstrList.size() ; i < e ; ++i) { MachineInstr *DI = SU->DbgInstrList[i]; assert (DI->getNumOperands()==3 && DI->getOperand(0).isReg() &&