X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;ds=sidebyside;f=lib%2FCodeGen%2FRegAllocGreedy.cpp;fp=lib%2FCodeGen%2FRegAllocGreedy.cpp;h=f30b6d803697ccfe46d3ffad084340d206aca417;hb=3f1ec42ec73d61eceddfca6071695431b50b78ed;hp=e94f1bb0b6c73ad55b1c0816b955de7df6cef438;hpb=fcadd6d973524cc82f8bc282b3f4102c56f89c03;p=oota-llvm.git diff --git a/lib/CodeGen/RegAllocGreedy.cpp b/lib/CodeGen/RegAllocGreedy.cpp index e94f1bb0b6c..f30b6d80369 100644 --- a/lib/CodeGen/RegAllocGreedy.cpp +++ b/lib/CodeGen/RegAllocGreedy.cpp @@ -552,7 +552,7 @@ void RAGreedy::enqueue(PQueue &CurQueue, LiveInterval *LI) { // Allocating bottom up may allow many short LRGs to be assigned first // to one of the cheap registers. This could be much faster for very // large blocks on targets with many physical registers. - Prio = Indexes->getZeroIndex().getInstrDistance(LI->beginIndex()); + Prio = Indexes->getZeroIndex().getInstrDistance(LI->endIndex()); } } else {