[llvm-commits] [llvm] r61371 - /llvm/trunk/lib/CodeGen/ScheduleDAG.cpp
Dan Gohman
gohman at apple.com
Tue Dec 23 09:22:37 PST 2008
Author: djg
Date: Tue Dec 23 11:22:32 2008
New Revision: 61371
URL: http://llvm.org/viewvc/llvm-project?rev=61371&view=rev
Log:
Minor code simplifications.
Modified:
llvm/trunk/lib/CodeGen/ScheduleDAG.cpp
Modified: llvm/trunk/lib/CodeGen/ScheduleDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScheduleDAG.cpp?rev=61371&r1=61370&r2=61371&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ScheduleDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/ScheduleDAG.cpp Tue Dec 23 11:22:32 2008
@@ -177,7 +177,7 @@
void SUnit::ComputeDepth() {
SmallVector<SUnit*, 8> WorkList;
WorkList.push_back(this);
- while (!WorkList.empty()) {
+ do {
SUnit *Cur = WorkList.back();
bool Done = true;
@@ -202,7 +202,7 @@
}
Cur->isDepthCurrent = true;
}
- }
+ } while (!WorkList.empty());
}
/// ComputeHeight - Calculate the maximal path from the node to the entry.
@@ -210,7 +210,7 @@
void SUnit::ComputeHeight() {
SmallVector<SUnit*, 8> WorkList;
WorkList.push_back(this);
- while (!WorkList.empty()) {
+ do {
SUnit *Cur = WorkList.back();
bool Done = true;
@@ -235,7 +235,7 @@
}
Cur->isHeightCurrent = true;
}
- }
+ } while (!WorkList.empty());
}
/// SUnit - Scheduling unit. It's an wrapper around either a single SDNode or
@@ -467,7 +467,7 @@
WorkList.reserve(SUnits.size());
WorkList.push_back(SU);
- while (!WorkList.empty()) {
+ do {
SU = WorkList.back();
WorkList.pop_back();
Visited.set(SU->NodeNum);
@@ -482,7 +482,7 @@
WorkList.push_back(SU->Succs[I].getSUnit());
}
}
- }
+ } while (!WorkList.empty());
}
/// Shift - Renumber the nodes so that the topological ordering is
More information about the llvm-commits
mailing list