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

Jakob Stoklund Olesen stoklund at 2pi.dk
Thu Jun 30 17:36:24 PDT 2011


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.

/jakob

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110630/b68f82e5/attachment.html>


More information about the llvm-commits mailing list