[llvm-commits] [llvm] r169198 - /llvm/trunk/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp
Jakub Staszak
kubastaszak at gmail.com
Mon Dec 3 17:00:52 PST 2012
Author: kuba
Date: Mon Dec 3 19:00:52 2012
New Revision: 169198
URL: http://llvm.org/viewvc/llvm-project?rev=169198&view=rev
Log:
Simplify code. No functionality change.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp?rev=169198&r1=169197&r2=169198&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp Mon Dec 3 19:00:52 2012
@@ -604,10 +604,8 @@
std::vector<SUnit *>::iterator Best = Queue.begin();
if (!DisableDFASched) {
signed BestCost = SUSchedulingCost(*Best);
- for (std::vector<SUnit *>::iterator I = Queue.begin(),
+ for (std::vector<SUnit *>::iterator I = llvm::next(Queue.begin()),
E = Queue.end(); I != E; ++I) {
- if (*I == *Best)
- continue;
if (SUSchedulingCost(*I) > BestCost) {
BestCost = SUSchedulingCost(*I);
More information about the llvm-commits
mailing list