diff options
author | Dan Gohman <gohman@apple.com> | 2008-11-18 21:22:20 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-11-18 21:22:20 +0000 |
commit | 6e58726416bfb8c10b62b351048efeb0a4dec583 (patch) | |
tree | 1bcaf861d7a875789279420747d562ae65cc909f /llvm/lib/CodeGen | |
parent | 71b632f9059874959574801b858aeb199696f494 (diff) | |
download | bcm5719-llvm-6e58726416bfb8c10b62b351048efeb0a4dec583.tar.gz bcm5719-llvm-6e58726416bfb8c10b62b351048efeb0a4dec583.zip |
Tidy up ScheduleNodeBottomUp methods, and make them more
consistent with ScheduleNodeTopDown methods.
llvm-svn: 59550
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp | 12 |
2 files changed, 8 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp index def8868da95..0af03580f66 100644 --- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp +++ b/llvm/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; } diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp index 7cec092c021..90471551f43 100644 --- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp @@ -302,9 +302,9 @@ void ScheduleDAGRRList::ReleasePred(SUnit *SU, SUnit *PredSU, bool isChain) { void ScheduleDAGRRList::ScheduleNodeBottomUp(SUnit *SU, unsigned CurCycle) { DOUT << "*** Scheduling [" << CurCycle << "]: "; DEBUG(SU->dump(this)); - SU->Cycle = CurCycle; - AvailableQueue->ScheduledNode(SU); + SU->Cycle = CurCycle; + Sequence.push_back(SU); // Bottom up: release predecessors for (SUnit::pred_iterator I = SU->Preds.begin(), E = SU->Preds.end(); @@ -339,6 +339,7 @@ void ScheduleDAGRRList::ScheduleNodeBottomUp(SUnit *SU, unsigned CurCycle) { } SU->isScheduled = true; + AvailableQueue->ScheduledNode(SU); } /// CapturePred - This does the opposite of ReleasePred. Since SU is being @@ -1060,10 +1061,8 @@ void ScheduleDAGRRList::ListScheduleBottomUp() { if (!CurSU) Sequence.push_back(0); - else { + else ScheduleNodeBottomUp(CurSU, CurCycle); - Sequence.push_back(CurSU); - } ++CurCycle; } @@ -1193,9 +1192,8 @@ void ScheduleDAGRRList::ListScheduleTopDown() { if (!CurSU) Sequence.push_back(0); - else { + else ScheduleNodeTopDown(CurSU, CurCycle); - } ++CurCycle; } |