Not all entries in the range will have an SUnit. Check for that when looking
authorJim Grosbach <grosbach@apple.com>
Wed, 2 Jun 2010 15:29:36 +0000 (15:29 +0000)
committerJim Grosbach <grosbach@apple.com>
Wed, 2 Jun 2010 15:29:36 +0000 (15:29 +0000)
for debug information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105324 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AggressiveAntiDepBreaker.cpp
lib/CodeGen/CriticalAntiDepBreaker.cpp

index 84b226b3d0f98535392c9e15f9d7056d962bbb4d..727e8f9628d8c7fbbcbc6a7d3113a567126b72cc 100644 (file)
@@ -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() &&
index 5eabe655704a95c389ae564b1e2fd57a3891f03d..42cc44812de0e09f3f3942bdea416becf96b6b88 100644 (file)
@@ -530,6 +530,7 @@ BreakAntiDependencies(const std::vector<SUnit>& 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() &&