summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineScheduler.cpp
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2013-01-29 06:26:35 +0000
committerAndrew Trick <atrick@apple.com>2013-01-29 06:26:35 +0000
commit399c9bfcc058a9152d47b80ae85213ef6497e74b (patch)
treeb6b07deedff43bc1fb8d316162e47870d05d47f6 /llvm/lib/CodeGen/MachineScheduler.cpp
parent1e29ca15011b725e5dbef460b7b644080b556d81 (diff)
downloadbcm5719-llvm-399c9bfcc058a9152d47b80ae85213ef6497e74b.tar.gz
bcm5719-llvm-399c9bfcc058a9152d47b80ae85213ef6497e74b.zip
MIsched: cleanup code. Use isBoundaryNode().
llvm-svn: 173775
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineScheduler.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp
index adf9a57ddeb..513d8a92689 100644
--- a/llvm/lib/CodeGen/MachineScheduler.cpp
+++ b/llvm/lib/CodeGen/MachineScheduler.cpp
@@ -587,17 +587,19 @@ void ScheduleDAGMI::findRootsAndBiasEdges(SmallVectorImpl<SUnit*> &TopRoots,
for (std::vector<SUnit>::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.
OpenPOWER on IntegriCloud