[llvm-commits] [llvm] r59465 - in /llvm/trunk/lib/CodeGen/SelectionDAG: ScheduleDAGList.cpp ScheduleDAGRRList.cpp
Dan Gohman
gohman at apple.com
Mon Nov 17 13:31:14 PST 2008
Author: djg
Date: Mon Nov 17 15:31:02 2008
New Revision: 59465
URL: http://llvm.org/viewvc/llvm-project?rev=59465&view=rev
Log:
Eliminate some trivial differences between the ScheduleNodeTopDown
functions in these two schedulers.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp?rev=59465&r1=59464&r2=59465&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp Mon Nov 17 15:31:02 2008
@@ -148,11 +148,14 @@
Sequence.push_back(SU);
SU->Cycle = CurCycle;
-
+
// Top down: release successors.
for (SUnit::succ_iterator I = SU->Succs.begin(), E = SU->Succs.end();
I != E; ++I)
ReleaseSucc(I->Dep, I->isCtrl);
+
+ SU->isScheduled = true;
+ AvailableQueue->ScheduledNode(SU);
}
/// ListScheduleTopDown - The main loop of list scheduling for top-down
@@ -235,8 +238,6 @@
if (FoundSUnit) {
ScheduleNodeTopDown(FoundSUnit, CurCycle);
HazardRec->EmitInstruction(FoundNode);
- FoundSUnit->isScheduled = true;
- AvailableQueue->ScheduledNode(FoundSUnit);
// If this is a pseudo-op node, we don't want to increment the current
// cycle.
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp?rev=59465&r1=59464&r2=59465&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Mon Nov 17 15:31:02 2008
@@ -1137,15 +1137,17 @@
void ScheduleDAGRRList::ScheduleNodeTopDown(SUnit *SU, unsigned CurCycle) {
DOUT << "*** Scheduling [" << CurCycle << "]: ";
DEBUG(SU->dump(DAG));
- SU->Cycle = CurCycle;
- AvailableQueue->ScheduledNode(SU);
+ SU->Cycle = CurCycle;
+ Sequence.push_back(SU);
// Top down: release successors
for (SUnit::succ_iterator I = SU->Succs.begin(), E = SU->Succs.end();
I != E; ++I)
ReleaseSucc(I->Dep, I->isCtrl, CurCycle);
+
SU->isScheduled = true;
+ AvailableQueue->ScheduledNode(SU);
}
/// ListScheduleTopDown - The main loop of list scheduling for top-down
@@ -1181,7 +1183,6 @@
Sequence.push_back(0);
else {
ScheduleNodeTopDown(CurSU, CurCycle);
- Sequence.push_back(CurSU);
}
++CurCycle;
}
More information about the llvm-commits
mailing list