aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/RegAllocGreedy.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-02-25 01:04:22 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-02-25 01:04:22 +0000
commit57f1e2cee06f9b57995727d786aeb1031c5376bd (patch)
treefb5767fa8f40572259156bee80fa8a4fd5af421b /lib/CodeGen/RegAllocGreedy.cpp
parentacca09bd64080393a047204eafad46e2fc34ee68 (diff)
downloadexternal_llvm-57f1e2cee06f9b57995727d786aeb1031c5376bd.tar.gz
external_llvm-57f1e2cee06f9b57995727d786aeb1031c5376bd.tar.bz2
external_llvm-57f1e2cee06f9b57995727d786aeb1031c5376bd.zip
Try harder to get the hint by preferring to evict hint interference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126463 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocGreedy.cpp')
-rw-r--r--lib/CodeGen/RegAllocGreedy.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/RegAllocGreedy.cpp b/lib/CodeGen/RegAllocGreedy.cpp
index 03d1372c2f..406485aaf4 100644
--- a/lib/CodeGen/RegAllocGreedy.cpp
+++ b/lib/CodeGen/RegAllocGreedy.cpp
@@ -379,6 +379,9 @@ unsigned RAGreedy::tryEvict(LiveInterval &VirtReg,
// Best so far.
BestPhys = PhysReg;
BestWeight = Weight;
+ // Stop if the hint can be used.
+ if (Order.isHint(PhysReg))
+ break;
}
if (!BestPhys)