[llvm-commits] [llvm] r134216 - /llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Thu Jun 30 18:25:49 PDT 2011


On 06/30/2011 08:36 PM, Jakob Stoklund Olesen wrote:
>
> On Jun 30, 2011, at 5:16 PM, Rafael Espindola wrote:
>
>> + // FIXME: If "B = X" kills X, we have to move the kill back to its
>> + // previous use. For now we just avoid the optimization in that case.
>> + if (MI->getOperand(1).isKill())
>> + return false;
>
> It's not so much the kill flags, they are actually recomputed after
> register allocation.
>
> It is important that the live ranges are updated, though. You need to
> shrink X to its uses when you remove a use.
>
> There doesn't have to be a kill flag: If you are removing the last use
> in a loop where X is not live out, it doesn't have to be live in the
> loop any more.

So the check should be "at the end of the life range"? Is

LifeRangeX.contains(CopySlot.getNextSlot())

the best way to check that?

> /jakob
>

Cheers,
Rafael



More information about the llvm-commits mailing list