summaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAllocGreedy.cpp
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2014-02-27 21:37:33 +0000
committerAndrew Trick <atrick@apple.com>2014-02-27 21:37:33 +0000
commit4c34f71b81c1d4ce6801b8d8fd2ec6a09198d129 (patch)
tree06fb0e93ae1e82b52b2d80f9747db28bb045fd47 /lib/CodeGen/RegAllocGreedy.cpp
parent594e2aa61eaba17d9836551ca479d987f2d9e059 (diff)
downloadllvm-4c34f71b81c1d4ce6801b8d8fd2ec6a09198d129.tar.gz
llvm-4c34f71b81c1d4ce6801b8d8fd2ec6a09198d129.tar.bz2
llvm-4c34f71b81c1d4ce6801b8d8fd2ec6a09198d129.tar.xz
Provide a target override for the latest regalloc heuristic.
This is a temporary workaround for native arm linux builds: PR18996: Changing regalloc order breaks "lencod" on native arm linux builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202433 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocGreedy.cpp')
-rw-r--r--lib/CodeGen/RegAllocGreedy.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/RegAllocGreedy.cpp b/lib/CodeGen/RegAllocGreedy.cpp
index 6e6a594479..3372e26195 100644
--- a/lib/CodeGen/RegAllocGreedy.cpp
+++ b/lib/CodeGen/RegAllocGreedy.cpp
@@ -457,7 +457,7 @@ void RAGreedy::enqueue(PQueue &CurQueue, LiveInterval *LI) {
// Giant live ranges fall back to the global assignment heuristic, which
// prevents excessive spilling in pathological cases.
bool ReverseLocal = TRI->reverseLocalAssignment();
- bool ForceGlobal = !ReverseLocal &&
+ bool ForceGlobal = !ReverseLocal && TRI->mayOverrideLocalAssignment() &&
(Size / SlotIndex::InstrDist) > (2 * MRI->getRegClass(Reg)->getNumRegs());
if (ExtraRegInfo[Reg].Stage == RS_Assign && !ForceGlobal && !LI->empty() &&