diff options
| author | Dan Gohman <gohman@apple.com> | 2008-04-15 22:40:14 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2008-04-15 22:40:14 +0000 |
| commit | 82b6673c44ee0153c5f252f38b95cb21396cc0b2 (patch) | |
| tree | 014429059ba3854024a573cfa0608ea7037ea3c3 /llvm/lib/CodeGen/SelectionDAG | |
| parent | 837b1dcf36a4c652b0c74d3cf66bb8d8e7ff8be1 (diff) | |
| download | bcm5719-llvm-82b6673c44ee0153c5f252f38b95cb21396cc0b2.tar.gz bcm5719-llvm-82b6673c44ee0153c5f252f38b95cb21396cc0b2.zip | |
Fix the new scheduler assertion checks to work when
the scheduler has inserted no-ops. This fixes
the 2006-07-03-schedulers.ll regression on ppc32.
llvm-svn: 49747
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp index ab492f40bc2..a08fc05c93e 100644 --- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp @@ -1076,6 +1076,7 @@ void ScheduleDAGRRList::ListScheduleBottomUp() { // Verify that all SUnits were scheduled. bool AnyNotSched = false; unsigned DeadNodes = 0; + unsigned Noops = 0; for (unsigned i = 0, e = SUnits.size(); i != e; ++i) { if (!SUnits[i].isScheduled) { if (SUnits[i].NumPreds == 0 && SUnits[i].NumSuccs == 0) { @@ -1096,8 +1097,11 @@ void ScheduleDAGRRList::ListScheduleBottomUp() { AnyNotSched = true; } } + for (unsigned i = 0, e = Sequence.size(); i != e; ++i) + if (!Sequence[i]) + ++Noops; assert(!AnyNotSched); - assert(Sequence.size() + DeadNodes == SUnits.size() && + assert(Sequence.size() + DeadNodes - Noops == SUnits.size() && "The number of nodes scheduled doesn't match the expected number!"); #endif } @@ -1193,6 +1197,7 @@ void ScheduleDAGRRList::ListScheduleTopDown() { // Verify that all SUnits were scheduled. bool AnyNotSched = false; unsigned DeadNodes = 0; + unsigned Noops = 0; for (unsigned i = 0, e = SUnits.size(); i != e; ++i) { if (!SUnits[i].isScheduled) { if (SUnits[i].NumPreds == 0 && SUnits[i].NumSuccs == 0) { @@ -1213,8 +1218,11 @@ void ScheduleDAGRRList::ListScheduleTopDown() { AnyNotSched = true; } } + for (unsigned i = 0, e = Sequence.size(); i != e; ++i) + if (!Sequence[i]) + ++Noops; assert(!AnyNotSched); - assert(Sequence.size() + DeadNodes == SUnits.size() && + assert(Sequence.size() + DeadNodes - Noops == SUnits.size() && "The number of nodes scheduled doesn't match the expected number!"); #endif } |

