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 | 4edf17d91fffd965cddcfbdebd2f7ff174b22425 (patch) | |
tree | e6e7803cf7f6b96abb32c2e5d79e70f33c18b852 /llvm/lib/CodeGen/CalcSpillWeights.cpp | |
parent | c249c411c26d0f70385231555d41a4388377d040 (diff) | |
download | bcm5719-llvm-4edf17d91fffd965cddcfbdebd2f7ff174b22425.tar.gz bcm5719-llvm-4edf17d91fffd965cddcfbdebd2f7ff174b22425.zip |
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.
llvm-svn: 131436
Diffstat (limited to 'llvm/lib/CodeGen/CalcSpillWeights.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CalcSpillWeights.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/CalcSpillWeights.cpp b/llvm/lib/CodeGen/CalcSpillWeights.cpp index e5894b8cca9..5d722ee34f7 100644 --- a/llvm/lib/CodeGen/CalcSpillWeights.cpp +++ b/llvm/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; } |