[PATCH] D13035: LiveIntervalAnalysis: Avoid multiple connected liveness components

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 17:33:26 PDT 2015


MatzeB added a comment.

In http://reviews.llvm.org/D13035#250321, @qcolombet wrote:

> Hi Matthias,
>
> Nice catch!
>
> Right now, this is on the users of shrinkUses to fix the multi component splitting.
>  The rationale, I think :), is that we want the users to be aware of the any virtual registers that would be created. This is not the case in that patch.
>
> The bottom line is I believe shrinkToUses should return true in those situations and we should fix the users of shrinkToUses, if need to.
>  Indeed, I, for instance, guess that the register coalescer would already do the right thing if we return true, since it creates new virtual registers, and wouldn’t have to fix it.
>
> What do you think?


computeDeadValues() is also used during the initial Liveness computation in which the return value is not checked (because we cannot have deadPhi values at that place). Seeing on the other hand that the creation of the new VReg is trivial and in this case faster because we know exactly that we will only have a single dead definition I decided to do the LiveInterval creation inline.

I also checked all places where shrinkToUses() is called to ensure they can deal with the fact that additional LiveIntervals may have been created.


Repository:
  rL LLVM

http://reviews.llvm.org/D13035





More information about the llvm-commits mailing list