forked from OSchip/llvm-project
parent
f563941adc
commit
ae551a853d
|
@ -604,10 +604,8 @@ SUnit *ResourcePriorityQueue::pop() {
|
||||||
std::vector<SUnit *>::iterator Best = Queue.begin();
|
std::vector<SUnit *>::iterator Best = Queue.begin();
|
||||||
if (!DisableDFASched) {
|
if (!DisableDFASched) {
|
||||||
signed BestCost = SUSchedulingCost(*Best);
|
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) {
|
E = Queue.end(); I != E; ++I) {
|
||||||
if (*I == *Best)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (SUSchedulingCost(*I) > BestCost) {
|
if (SUSchedulingCost(*I) > BestCost) {
|
||||||
BestCost = SUSchedulingCost(*I);
|
BestCost = SUSchedulingCost(*I);
|
||||||
|
|
Loading…
Reference in New Issue