Silence comparison always false warning in -Asserts mode.

llvm-svn: 83164
This commit is contained in:
Reid Kleckner 2009-09-30 20:43:07 +00:00
parent c87197784a
commit cea8dab1d1
1 changed files with 4 additions and 4 deletions

View File

@ -197,17 +197,17 @@ void ScheduleDAGRRList::Schedule() {
/// the AvailableQueue if the count reaches zero. Also update its cycle bound.
void ScheduleDAGRRList::ReleasePred(SUnit *SU, const SDep *PredEdge) {
SUnit *PredSU = PredEdge->getSUnit();
--PredSU->NumSuccsLeft;
#ifndef NDEBUG
if (PredSU->NumSuccsLeft < 0) {
if (PredSU->NumSuccsLeft == 0) {
errs() << "*** Scheduling failed! ***\n";
PredSU->dump(this);
errs() << " has been released too many times!\n";
llvm_unreachable(0);
}
#endif
--PredSU->NumSuccsLeft;
// If all the node's successors are scheduled, this node is ready
// to be scheduled. Ignore the special EntrySU node.
if (PredSU->NumSuccsLeft == 0 && PredSU != &EntrySU) {