Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/CodeGen/PostRASchedulerList.cpp
Show First 20 Lines • Show All 521 Lines • ▼ Show 20 Lines | void SchedulePostRATDList::ListScheduleTopDown() { | ||||
unsigned CurCycle = 0; | unsigned CurCycle = 0; | ||||
// We're scheduling top-down but we're visiting the regions in | // We're scheduling top-down but we're visiting the regions in | ||||
// bottom-up order, so we don't know the hazards at the start of a | // bottom-up order, so we don't know the hazards at the start of a | ||||
// region. So assume no hazards (this should usually be ok as most | // region. So assume no hazards (this should usually be ok as most | ||||
// blocks are a single region). | // blocks are a single region). | ||||
HazardRec->Reset(); | HazardRec->Reset(); | ||||
// Release any successors of the special Entry node. | |||||
ReleaseSuccessors(&EntrySU); | |||||
// Add all leaves to Available queue. | // Add all leaves to Available queue. | ||||
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].NumPredsLeft && !SUnits[i].isAvailable) { | if (!SUnits[i].NumPredsLeft && !SUnits[i].isAvailable) { | ||||
AvailableQueue.push(&SUnits[i]); | AvailableQueue.push(&SUnits[i]); | ||||
SUnits[i].isAvailable = true; | SUnits[i].isAvailable = true; | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 161 Lines • Show Last 20 Lines |