[llvm] r173775 - MIsched: cleanup code. Use isBoundaryNode().
Andrew Trick
atrick at apple.com
Mon Jan 28 22:26:35 PST 2013
Author: atrick
Date: Tue Jan 29 00:26:35 2013
New Revision: 173775
URL: http://llvm.org/viewvc/llvm-project?rev=173775&view=rev
Log:
MIsched: cleanup code. Use isBoundaryNode().
Modified:
llvm/trunk/lib/CodeGen/MachineScheduler.cpp
Modified: llvm/trunk/lib/CodeGen/MachineScheduler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineScheduler.cpp?rev=173775&r1=173774&r2=173775&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineScheduler.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineScheduler.cpp Tue Jan 29 00:26:35 2013
@@ -587,17 +587,19 @@ void ScheduleDAGMI::findRootsAndBiasEdge
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.
More information about the llvm-commits
mailing list