diff options
author | Dylan McKay <dylanmckay34@gmail.com> | 2016-10-11 01:04:36 +0000 |
---|---|---|
committer | Dylan McKay <dylanmckay34@gmail.com> | 2016-10-11 01:04:36 +0000 |
commit | 25d9f1156f1a0eeda443501ca1131313b60bf52c (patch) | |
tree | 7cbcdb1dbae03c22cfff4971822c68af42a4e802 /lib/CodeGen/LiveRangeEdit.cpp | |
parent | 365654256b1411c0fcaeac498267e33bb9d17d7d (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283838 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveRangeEdit.cpp')
-rw-r--r-- | lib/CodeGen/LiveRangeEdit.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/LiveRangeEdit.cpp b/lib/CodeGen/LiveRangeEdit.cpp index 6165689054d..bbbac4c9d1d 100644 --- a/lib/CodeGen/LiveRangeEdit.cpp +++ b/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); } |