aboutsummaryrefslogtreecommitdiffstats
path: root/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
commite3b23cde80b19507f1d8b641a541e91ace0864dc (patch)
tree10806194e6d64949fd2dd95d36f75211a6c7f84c /lib/CodeGen
parent8a06af96698537377275dd7848db69915638dd26 (diff)
downloadexternal_llvm-e3b23cde80b19507f1d8b641a541e91ace0864dc.tar.gz
external_llvm-e3b23cde80b19507f1d8b641a541e91ace0864dc.tar.bz2
external_llvm-e3b23cde80b19507f1d8b641a541e91ace0864dc.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! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153904 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/RegAllocGreedy.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/RegAllocGreedy.cpp b/lib/CodeGen/RegAllocGreedy.cpp
index f29a85287b..d00259a6d9 100644
--- a/lib/CodeGen/RegAllocGreedy.cpp
+++ b/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;
}