From 399c9bfcc058a9152d47b80ae85213ef6497e74b Mon Sep 17 00:00:00 2001 From: Andrew Trick Date: Tue, 29 Jan 2013 06:26:35 +0000 Subject: [PATCH] MIsched: cleanup code. Use isBoundaryNode(). llvm-svn: 173775 --- llvm/lib/CodeGen/MachineScheduler.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp index adf9a57..513d8a9 100644 --- a/llvm/lib/CodeGen/MachineScheduler.cpp +++ b/llvm/lib/CodeGen/MachineScheduler.cpp @@ -587,17 +587,19 @@ void ScheduleDAGMI::findRootsAndBiasEdges(SmallVectorImpl &TopRoots, for (std::vector::iterator I = SUnits.begin(), E = SUnits.end(); I != E; ++I) { SUnit *SU = &(*I); + assert(!SU->isBoundaryNode() && "Boundary node should not be in SUnits"); // Order predecessors so DFSResult follows the critical path. SU->biasCriticalPath(); // A SUnit is ready to top schedule if it has no predecessors. - if (!I->NumPredsLeft && SU != &EntrySU) + if (!I->NumPredsLeft) TopRoots.push_back(SU); // A SUnit is ready to bottom schedule if it has no successors. - if (!I->NumSuccsLeft && SU != &ExitSU) + if (!I->NumSuccsLeft) BotRoots.push_back(SU); } + ExitSU.biasCriticalPath(); } /// Identify DAG roots and setup scheduler queues. -- 2.7.4