From: Chris Lattner Date: Sun, 18 Dec 2005 01:03:46 +0000 (+0000) Subject: Simplify code X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a5282d8df2fe5253b274c97de2617a7c141c5ca8;p=oota-llvm.git Simplify code git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24806 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp index c1a7f47bbc3..db0543644ed 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.