aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-12-18 01:03:46 +0000
committerChris Lattner <sabre@nondot.org>2005-12-18 01:03:46 +0000
commita5282d8df2fe5253b274c97de2617a7c141c5ca8 (patch)
treeeebd257a2929175a355c6186779c51dfe5f0f417 /lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
parent38abcb500fbb868514d83152cc178ecf2d7ba6e4 (diff)
Simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24806 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/ScheduleDAG.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAG.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
index c1a7f47bbc..db0543644e 100644
--- a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
@@ -704,13 +704,8 @@ void SimpleSched::VisitAll() {
if (DAG.getEntryNode().Val != DAG.getRoot().Val)
Ordering.push_back(getNI(DAG.getEntryNode().Val));
- // FIXME - Reverse the order
- for (unsigned i = 0, N = Ordering.size(), Half = N >> 1; i < Half; i++) {
- unsigned j = N - i - 1;
- NodeInfo *tmp = Ordering[i];
- Ordering[i] = Ordering[j];
- Ordering[j] = tmp;
- }
+ // Reverse the order
+ std::reverse(Ordering.begin(), Ordering.end());
}
/// IdentifyGroups - Put flagged nodes into groups.