summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/CodeGen/CalcSpillWeights.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2016-02-21 16:23:44 +0000
committerdim <dim@FreeBSD.org>2016-02-21 16:23:44 +0000
commit5082f936dc42b118ee4ffb925af6e5979070b01f (patch)
treec3ed2eba6ed6d6a807aca69342c053354fb156ea /contrib/llvm/lib/CodeGen/CalcSpillWeights.cpp
parent2e1a0cbbd8f5a5ca7ec73c85311451ed1ac4242c (diff)
downloadFreeBSD-src-5082f936dc42b118ee4ffb925af6e5979070b01f.zip
FreeBSD-src-5082f936dc42b118ee4ffb925af6e5979070b01f.tar.gz
Update llvm and clang to release_38 branch r261369.
Diffstat (limited to 'contrib/llvm/lib/CodeGen/CalcSpillWeights.cpp')
-rw-r--r--contrib/llvm/lib/CodeGen/CalcSpillWeights.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/llvm/lib/CodeGen/CalcSpillWeights.cpp b/contrib/llvm/lib/CodeGen/CalcSpillWeights.cpp
index abc655a..26aa46f 100644
--- a/contrib/llvm/lib/CodeGen/CalcSpillWeights.cpp
+++ b/contrib/llvm/lib/CodeGen/CalcSpillWeights.cpp
@@ -213,8 +213,11 @@ VirtRegAuxInfo::calculateSpillWeightAndHint(LiveInterval &li) {
if (!Spillable)
return;
- // Mark li as unspillable if all live ranges are tiny.
- if (li.isZeroLength(LIS.getSlotIndexes())) {
+ // Mark li as unspillable if all live ranges are tiny and the interval
+ // is not live at any reg mask. If the interval is live at a reg mask
+ // spilling may be required.
+ if (li.isZeroLength(LIS.getSlotIndexes()) &&
+ !li.isLiveAtIndexes(LIS.getRegMaskSlots())) {
li.markNotSpillable();
return;
}
OpenPOWER on IntegriCloud