aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2011-03-25 06:40:55 +0000
committerAndrew Trick <atrick@apple.com>2011-03-25 06:40:55 +0000
commit336298cf2cc68d9af163992b9f9cafddd4bb3c8a (patch)
tree299cb8f875dba5b1a80a59f36058c567b80e7ace
parent628b337561cfb8ae862155fee710b5ca172b7a8e (diff)
Fix for -pre-RA-sched=source.
Yet another case of unchecked NULL node (for physreg copy). May fix PR9509. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128266 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
index f02d78f613..f5a5db89fa 100644
--- a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
+++ b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
@@ -1500,6 +1500,8 @@ public:
unsigned getNodePriority(const SUnit *SU) const;
unsigned getNodeOrdering(const SUnit *SU) const {
+ if (!SU->getNode()) return 0;
+
return scheduleDAG->DAG->GetOrdering(SU->getNode());
}