[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:21:59 PDT 2016


MatzeB added a comment.

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

> 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.
>
>
> I may have misread your comment.  You are saying that the existence of these defs (dead or not) can cause regressions in the register allocator?  I don't think that the allocator can actually assign two different (unrelated) registers to sub-ranges of a single large virtual register, can it?  There is a pass that would separate independent lanes, I guess that would help here: a read-undef could become an actual IMPLICIT_DEF, and then, if it's removable, it could be deleted completely.


Oh I just understood what you meant. No the register allocator will of course only assign a single physreg superregister to a vreg. Assigning independent physregs to different lanes is invalid in general (indeed the RenameIndependentSubRegs pass I added goes to great length to find the cases where it is legal and renamed the registers to give the regalloc more freedom).

Having dead-defs around will still negatively affect allocation because we may block the possibility to re-use an otherwise unused sublane for a different vreg (I hope I explained this better in my other comment).


Repository:
  rL LLVM

http://reviews.llvm.org/D21189





More information about the llvm-commits mailing list