Tidy up ScheduleNodeBottomUp methods, and make them more
consistent with ScheduleNodeTopDown methods.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59550 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
index def8868..0af0358 100644
--- a/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
+++ b/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
@@ -161,7 +161,9 @@
 void ScheduleDAGFast::ScheduleNodeBottomUp(SUnit *SU, unsigned CurCycle) {
   DOUT << "*** Scheduling [" << CurCycle << "]: ";
   DEBUG(SU->dump(this));
+
   SU->Cycle = CurCycle;
+  Sequence.push_back(SU);
 
   // Bottom up: release predecessors
   for (SUnit::pred_iterator I = SU->Preds.begin(), E = SU->Preds.end();
@@ -589,10 +591,8 @@
 
     if (!CurSU)
       Sequence.push_back(0);
-    else {
+    else
       ScheduleNodeBottomUp(CurSU, CurCycle);
-      Sequence.push_back(CurSU);
-    }
     ++CurCycle;
   }