mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-09 16:45:03 +00:00
Eliminate some trivial differences between the ScheduleNodeTopDown
functions in these two schedulers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59465 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7fed65a68d
commit
8123419f2b
@ -148,11 +148,14 @@ void ScheduleDAGList::ScheduleNodeTopDown(SUnit *SU, unsigned CurCycle) {
|
||||
|
||||
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 @@ void ScheduleDAGList::ListScheduleTopDown() {
|
||||
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.
|
||||
|
@ -1137,15 +1137,17 @@ void ScheduleDAGRRList::ReleaseSucc(SUnit *SuccSU, bool isChain,
|
||||
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 @@ void ScheduleDAGRRList::ListScheduleTopDown() {
|
||||
Sequence.push_back(0);
|
||||
else {
|
||||
ScheduleNodeTopDown(CurSU, CurCycle);
|
||||
Sequence.push_back(CurSU);
|
||||
}
|
||||
++CurCycle;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user