diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-05-16 23:50:05 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-05-16 23:50:05 +0000 |
commit | f5497fb1b474028709f0a6d8556251dc21e34c26 (patch) | |
tree | d5cc491f94265121d012bda0305a5a2eed7d4e18 /lib/CodeGen/CalcSpillWeights.cpp | |
parent | 0c720761903394c4dd232b9fe49da7d5fb40172b (diff) | |
download | llvm-f5497fb1b474028709f0a6d8556251dc21e34c26.tar.gz llvm-f5497fb1b474028709f0a6d8556251dc21e34c26.tar.bz2 llvm-f5497fb1b474028709f0a6d8556251dc21e34c26.tar.xz |
Teach LiveInterval::isZeroLength about null SlotIndexes.
When instructions are deleted, they leave tombstone SlotIndex entries.
The isZeroLength method should ignore these null indexes.
This causes RABasic to sometimes spill a callee-saved register in the
abi-isel.ll test, so don't run that test with -regalloc=basic. Prioritizing
register allocation according to spill weight can cause more registers to be
used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131436 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CalcSpillWeights.cpp')
-rw-r--r-- | lib/CodeGen/CalcSpillWeights.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CalcSpillWeights.cpp b/lib/CodeGen/CalcSpillWeights.cpp index e5894b8cca..5d722ee34f 100644 --- a/lib/CodeGen/CalcSpillWeights.cpp +++ b/lib/CodeGen/CalcSpillWeights.cpp @@ -165,7 +165,7 @@ void VirtRegAuxInfo::CalculateWeightAndHint(LiveInterval &li) { return; // Mark li as unspillable if all live ranges are tiny. - if (li.isZeroLength()) { + if (li.isZeroLength(LIS.getSlotIndexes())) { li.markNotSpillable(); return; } |