summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-09-28 16:09:41 +0000
committerDan Gohman <gohman@apple.com>2009-09-28 16:09:41 +0000
commit937d2d86242339c17e77a6016b96999f439a1714 (patch)
treec8115bc9fe0c2fb6816c1e2013b497c3fd38b38a /lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
parent322b95cd5f94bb3ff21ce3e809ba36f1a292aea8 (diff)
downloadllvm-937d2d86242339c17e77a6016b96999f439a1714.tar.gz
llvm-937d2d86242339c17e77a6016b96999f439a1714.tar.bz2
llvm-937d2d86242339c17e77a6016b96999f439a1714.tar.xz
Use VerifySchedule instead of doing the work manually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82995 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp36
1 files changed, 3 insertions, 33 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
index c724fe214f..d1930b1a2c 100644
--- a/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
+++ b/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
@@ -588,41 +588,11 @@ void ScheduleDAGFast::ListScheduleBottomUp() {
++CurCycle;
}
- // Reverse the order if it is bottom up.
+ // Reverse the order since it is bottom up.
std::reverse(Sequence.begin(), Sequence.end());
-
-
+
#ifndef NDEBUG
- // 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) {
- ++DeadNodes;
- continue;
- }
- if (!AnyNotSched)
- errs() << "*** List scheduling failed! ***\n";
- SUnits[i].dump(this);
- errs() << "has not been scheduled!\n";
- AnyNotSched = true;
- }
- if (SUnits[i].NumSuccsLeft != 0) {
- if (!AnyNotSched)
- errs() << "*** List scheduling failed! ***\n";
- SUnits[i].dump(this);
- errs() << "has successors left!\n";
- AnyNotSched = true;
- }
- }
- for (unsigned i = 0, e = Sequence.size(); i != e; ++i)
- if (!Sequence[i])
- ++Noops;
- assert(!AnyNotSched);
- assert(Sequence.size() + DeadNodes - Noops == SUnits.size() &&
- "The number of nodes scheduled doesn't match the expected number!");
+ VerifySchedule(/*isBottomUp=*/true);
#endif
}