From: Andrew Trick Date: Fri, 25 Mar 2011 06:40:55 +0000 (+0000) Subject: Fix for -pre-RA-sched=source. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=336298cf2cc68d9af163992b9f9cafddd4bb3c8a;p=oota-llvm.git 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 --- diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp index f02d78f6134..f5a5db89fa0 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()); }