summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveRangeEdit.cpp
diff options
context:
space:
mode:
authorDylan McKay <dylanmckay34@gmail.com>2016-10-11 01:04:36 +0000
committerDylan McKay <dylanmckay34@gmail.com>2016-10-11 01:04:36 +0000
commitc328fe5af4717dc39cdcd0501f9149eb2ea1284d (patch)
treef98b5198ec007bfcbf1c92c81fbbb33b6bc3b37e /llvm/lib/CodeGen/LiveRangeEdit.cpp
parent9aa4ab6f9beeccfd7abf0da24d87626bbbb79abc (diff)
downloadbcm5719-llvm-c328fe5af4717dc39cdcd0501f9149eb2ea1284d.tar.gz
bcm5719-llvm-c328fe5af4717dc39cdcd0501f9149eb2ea1284d.zip
[RegAllocGreedy] Attempt to split unspillable live intervals
Summary: Previously, when allocating unspillable live ranges, we would never attempt to split. We would always bail out and try last ditch graph recoloring. This patch changes this by attempting to split all live intervals before performing recoloring. This fixes LLVM bug PR14879. I can't add test cases for any backends other than AVR because none of them have small enough register classes to trigger the bug. Reviewers: qcolombet Subscribers: MatzeB Differential Revision: https://reviews.llvm.org/D25070 llvm-svn: 283838
Diffstat (limited to 'llvm/lib/CodeGen/LiveRangeEdit.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveRangeEdit.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveRangeEdit.cpp b/llvm/lib/CodeGen/LiveRangeEdit.cpp
index 6165689054d..bbbac4c9d1d 100644
--- a/llvm/lib/CodeGen/LiveRangeEdit.cpp
+++ b/llvm/lib/CodeGen/LiveRangeEdit.cpp
@@ -438,6 +438,9 @@ LiveRangeEdit::MRI_NoteNewVirtualRegister(unsigned VReg)
if (VRM)
VRM->grow();
+ if (Parent && !Parent->isSpillable())
+ LIS.getInterval(VReg).markNotSpillable();
+
NewRegs.push_back(VReg);
}
OpenPOWER on IntegriCloud