summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-11-18 21:22:20 +0000
committerDan Gohman <gohman@apple.com>2008-11-18 21:22:20 +0000
commit1256f5fe769ab2cced36abf2cbf9e1f63f22282d (patch)
treebfb713cdaa0a4ccd86ccdcb1071d1da952b3b663 /lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
parent0454e8685fa4ca75c710dad7203dc137e551a2c1 (diff)
downloadllvm-1256f5fe769ab2cced36abf2cbf9e1f63f22282d.tar.gz
llvm-1256f5fe769ab2cced36abf2cbf9e1f63f22282d.tar.bz2
llvm-1256f5fe769ab2cced36abf2cbf9e1f63f22282d.tar.xz
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
Diffstat (limited to 'lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
index def8868da9..0af03580f6 100644
--- a/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
+++ b/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
@@ -161,7 +161,9 @@ void ScheduleDAGFast::ReleasePred(SUnit *SU, SUnit *PredSU, bool isChain) {
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 @@ void ScheduleDAGFast::ListScheduleBottomUp() {
if (!CurSU)
Sequence.push_back(0);
- else {
+ else
ScheduleNodeBottomUp(CurSU, CurCycle);
- Sequence.push_back(CurSU);
- }
++CurCycle;
}