[llvm-commits] [llvm] r59550 - in /llvm/trunk/lib/CodeGen/SelectionDAG: ScheduleDAGFast.cpp ScheduleDAGRRList.cpp
Dan Gohman
gohman at apple.com
Tue Nov 18 13:22:20 PST 2008
Author: djg
Date: Tue Nov 18 15:22:20 2008
New Revision: 59550
URL: http://llvm.org/viewvc/llvm-project?rev=59550&view=rev
Log:
Tidy up ScheduleNodeBottomUp methods, and make them more
consistent with ScheduleNodeTopDown methods.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp?rev=59550&r1=59549&r2=59550&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp Tue Nov 18 15:22:20 2008
@@ -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;
}
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp?rev=59550&r1=59549&r2=59550&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Tue Nov 18 15:22:20 2008
@@ -302,9 +302,9 @@
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 @@
}
SU->isScheduled = true;
+ AvailableQueue->ScheduledNode(SU);
}
/// CapturePred - This does the opposite of ReleasePred. Since SU is being
@@ -1060,10 +1061,8 @@
if (!CurSU)
Sequence.push_back(0);
- else {
+ else
ScheduleNodeBottomUp(CurSU, CurCycle);
- Sequence.push_back(CurSU);
- }
++CurCycle;
}
@@ -1193,9 +1192,8 @@
if (!CurSU)
Sequence.push_back(0);
- else {
+ else
ScheduleNodeTopDown(CurSU, CurCycle);
- }
++CurCycle;
}
More information about the llvm-commits
mailing list