diff options
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/MachineScheduler.cpp | 7 | ||||
-rw-r--r-- | llvm/lib/CodeGen/ScheduleDAG.cpp | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp index 3984a15861d..f7dd53b9b9b 100644 --- a/llvm/lib/CodeGen/MachineScheduler.cpp +++ b/llvm/lib/CodeGen/MachineScheduler.cpp @@ -707,6 +707,7 @@ void ScheduleDAGMI::schedule() { DEBUG(dbgs() << "** ScheduleDAGMI::schedule picking next node\n"); SUnit *SU = SchedImpl->pickNode(IsTopNode); if (!SU) break; + assert(!SU->skip); assert(!SU->isScheduled && "Node already scheduled"); if (!checkSchedLimit()) @@ -764,6 +765,8 @@ findRootsAndBiasEdges(SmallVectorImpl<SUnit*> &TopRoots, SmallVectorImpl<SUnit*> &BotRoots) { for (std::vector<SUnit>::iterator I = SUnits.begin(), E = SUnits.end(); I != E; ++I) { + if (I->skip) + continue; SUnit *SU = &(*I); assert(!SU->isBoundaryNode() && "Boundary node should not be in SUnits"); @@ -1518,6 +1521,8 @@ void BaseMemOpClusterMutation::apply(ScheduleDAGInstrs *DAGInstrs) { SmallVector<SmallVector<SUnit*,4>, 32> StoreChainDependents; for (unsigned Idx = 0, End = DAG->SUnits.size(); Idx != End; ++Idx) { SUnit *SU = &DAG->SUnits[Idx]; + if (SU->skip) + continue; if ((IsLoad && !SU->getInstr()->mayLoad()) || (!IsLoad && !SU->getInstr()->mayStore())) continue; @@ -1810,6 +1815,8 @@ void CopyConstrain::apply(ScheduleDAGInstrs *DAGInstrs) { for (unsigned Idx = 0, End = DAG->SUnits.size(); Idx != End; ++Idx) { SUnit *SU = &DAG->SUnits[Idx]; + if (SU->skip) + continue; if (!SU->getInstr()->isCopy()) continue; diff --git a/llvm/lib/CodeGen/ScheduleDAG.cpp b/llvm/lib/CodeGen/ScheduleDAG.cpp index 1f0c3283ceb..bb118628fb0 100644 --- a/llvm/lib/CodeGen/ScheduleDAG.cpp +++ b/llvm/lib/CodeGen/ScheduleDAG.cpp @@ -329,6 +329,10 @@ void SUnit::dump(const ScheduleDAG *G) const { void SUnit::dumpAll(const ScheduleDAG *G) const { dump(G); + if (skip) { + dbgs() << " Skipped\n"; + return; + } dbgs() << " # preds left : " << NumPredsLeft << "\n"; dbgs() << " # succs left : " << NumSuccsLeft << "\n"; |