summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-04-02 22:30:39 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-04-02 22:30:39 +0000
commit291007b055b15ce2432f132cbcbd602fb349ebf8 (patch)
tree03d20ad814e1fbfe5cd061b704aac10d5b396c17 /llvm/lib/CodeGen
parent2bde2f42b1edbb7c4632c5ba0be541bf5c094f38 (diff)
downloadbcm5719-llvm-291007b055b15ce2432f132cbcbd602fb349ebf8.tar.gz
bcm5719-llvm-291007b055b15ce2432f132cbcbd602fb349ebf8.zip
Allocate virtual registers in ascending order.
This is just the fallback tie-breaker ordering, the main allocation order is still descending size. Patch by Shamil Kurmangaleev! llvm-svn: 153904
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/RegAllocGreedy.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp
index f29a85287ba..d00259a6d91 100644
--- a/llvm/lib/CodeGen/RegAllocGreedy.cpp
+++ b/llvm/lib/CodeGen/RegAllocGreedy.cpp
@@ -428,13 +428,13 @@ void RAGreedy::enqueue(LiveInterval *LI) {
Prio |= (1u << 30);
}
- Queue.push(std::make_pair(Prio, Reg));
+ Queue.push(std::make_pair(Prio, ~Reg));
}
LiveInterval *RAGreedy::dequeue() {
if (Queue.empty())
return 0;
- LiveInterval *LI = &LIS->getInterval(Queue.top().second);
+ LiveInterval *LI = &LIS->getInterval(~Queue.top().second);
Queue.pop();
return LI;
}
OpenPOWER on IntegriCloud