Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/CodeGen/SelectionDAG/ScheduleDAGVLIW.cpp
Show First 20 Lines • Show All 160 Lines • ▼ Show 20 Lines | void ScheduleDAGVLIW::scheduleNodeTopDown(SUnit *SU, unsigned CurCycle) { | ||||
AvailableQueue->scheduledNode(SU); | AvailableQueue->scheduledNode(SU); | ||||
} | } | ||||
/// listScheduleTopDown - The main loop of list scheduling for top-down | /// listScheduleTopDown - The main loop of list scheduling for top-down | ||||
/// schedulers. | /// schedulers. | ||||
void ScheduleDAGVLIW::listScheduleTopDown() { | void ScheduleDAGVLIW::listScheduleTopDown() { | ||||
unsigned CurCycle = 0; | unsigned CurCycle = 0; | ||||
// Release any successors of the special Entry node. | |||||
releaseSuccessors(&EntrySU); | |||||
// All leaves to AvailableQueue. | // All leaves to AvailableQueue. | ||||
for (unsigned i = 0, e = SUnits.size(); i != e; ++i) { | for (unsigned i = 0, e = SUnits.size(); i != e; ++i) { | ||||
// It is available if it has no predecessors. | // It is available if it has no predecessors. | ||||
if (SUnits[i].Preds.empty()) { | if (SUnits[i].Preds.empty()) { | ||||
AvailableQueue->push(&SUnits[i]); | AvailableQueue->push(&SUnits[i]); | ||||
SUnits[i].isAvailable = true; | SUnits[i].isAvailable = true; | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 97 Lines • Show Last 20 Lines |