[llvm-commits] [llvm] r150494 - in /llvm/trunk: include/llvm/CodeGen/LiveIntervalAnalysis.h lib/CodeGen/LiveIntervalAnalysis.cpp test/CodeGen/ARM/2010-05-18-PostIndexBug.ll

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue Feb 14 16:23:17 PST 2012


On Feb 14, 2012, at 10:51 AM, Lang Hames <lhames at gmail.com> wrote:

>   // Live-in register might not be used at all.
>   if (!SeenDefUse) {
> -    DEBUG(dbgs() << " live through");
> -    end = getMBBEndIdx(MBB);
> +    if (isAllocatable(interval.reg) || isReserved(interval.reg)) {
> +      // This must be an entry block or landing pad - we asserted so on entry
> +      // to the function. For these blocks the interval is dead on entry.
> +      DEBUG(dbgs() << " dead");
> +      end = start.getDeadSlot();
> +    } else {

When a physreg is marked as live-in to a block, but it turns out it is really dead, we shouldn't give it any live range at all in the basic block.

I don't want live ranges to end at the getDeadSlot() if there is no underlying instruction backing the SlotIndex.

Ideally, we should only ever refer to the getBlockSlot() of getMBBStartIdx() and getMBBEndIdx().

/jakob




More information about the llvm-commits mailing list