Teach LiveInterval::isZeroLength about null SlotIndexes.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Mon, 16 May 2011 23:50:05 +0000 (23:50 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Mon, 16 May 2011 23:50:05 +0000 (23:50 +0000)
commitf5497fb1b474028709f0a6d8556251dc21e34c26
treed5cc491f94265121d012bda0305a5a2eed7d4e18
parent0c720761903394c4dd232b9fe49da7d5fb40172b
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
include/llvm/CodeGen/LiveInterval.h
lib/CodeGen/CalcSpillWeights.cpp
test/CodeGen/ARM/vldlane.ll
test/CodeGen/X86/abi-isel.ll