aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-01-09 23:01:55 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-01-09 23:01:55 +0000
commit19107563af7568713193c60be24503446556bff2 (patch)
tree64bab13a16c649421a1dbc05e312126af8a9c4fd /lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
parentec1213fbbba161401e22bd41005a3b1a39008807 (diff)
downloadexternal_llvm-19107563af7568713193c60be24503446556bff2.zip
external_llvm-19107563af7568713193c60be24503446556bff2.tar.gz
external_llvm-19107563af7568713193c60be24503446556bff2.tar.bz2
Special copy SUnit's do not have SDNode's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45787 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
index 4cd4577..05ba46d 100644
--- a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
+++ b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
@@ -1208,13 +1208,13 @@ static unsigned calcMaxScratches(const SUnit *SU) {
for (SUnit::const_pred_iterator I = SU->Preds.begin(), E = SU->Preds.end();
I != E; ++I) {
if (I->isCtrl) continue; // ignore chain preds
- if (I->Dep->Node->getOpcode() != ISD::CopyFromReg)
+ if (!I->Dep->Node || I->Dep->Node->getOpcode() != ISD::CopyFromReg)
Scratches++;
}
for (SUnit::const_succ_iterator I = SU->Succs.begin(), E = SU->Succs.end();
I != E; ++I) {
if (I->isCtrl) continue; // ignore chain succs
- if (I->Dep->Node->getOpcode() != ISD::CopyToReg)
+ if (!I->Dep->Node || I->Dep->Node->getOpcode() != ISD::CopyToReg)
Scratches += 10;
}
return Scratches;