[PATCH] D21189: Create subranges for new intervals resulting from live interval splitting

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 24 13:11:20 PDT 2016


MatzeB added a comment.

In http://reviews.llvm.org/D21189#466695, @kparzysz wrote:

> In http://reviews.llvm.org/D21189#466694, @MatzeB wrote:
>
> > Maybe if we had a way to clean extra unused dead-defs...
>
>
> I thought of having such defs (including those created by IMPLICIT_DEFs) as always dead in a live range, and have them be non-extendable.  In other words, LiveRange would somehow know that a [64r,64d) is a definition that cannot be extended to any use.
>  That would require storing extra information inside LiveRange, or perhaps we could use a special (reserved) id for the value number?


I am not sure what you mean by "non-extendable". But in each case even a dead def occupies a register at that point and will prohibit the allocator from letting other values live through that point.

The IMPLICIT_DEFs are slightly odd but are no problem for allocation, because they are only used at the end of a block in situations where the block jumps to a merge point after which the register is live anyway. So this only prohibits us from letting something live through the implicit def into the terminator instructions, we couldn't have anything live into the merge block anyway because the regiser is occupied (for real) there.
read-undef subregister defs on the other hand can happen anywhere in a block and will therefore block registers at a point where we may want to let other values live through.

If you use them as a tool for liveness calculation, then liveness calculation should also clean those up I think. We could indeed temporarily use the VNInfo id field or similar to mark those...


Repository:
  rL LLVM

http://reviews.llvm.org/D21189





More information about the llvm-commits mailing list