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

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 24 06:37:23 PDT 2016


kparzysz added a comment.

With this interpretation of <def,read-undef>, there is a problem in extending live ranges:

  16 vreg0<def> = ...
  24 ... = vreg0<kill>
  ...
  64 vreg0:sub0<def,read-undef>
  72 ... = vreg0

Suppose that vreg0 has two lanes: L1 and L2, corresponding to sub0 and sub1.  When creating the live ranges, after the dead defs have been created, but before extending to uses, the live range for L2 will be simply [16r,16d). There will be no indication in there that the value defined at 16 should not be extended to the use at 72.

What I'm considering is to treat <def,read-undef> of a lane as if it was an IMPLICIT_DEF of all other lanes.  In other words, a <def,read-undef> would add a def to all subranges, not only the one corresponding to the specified subregister.  In the example above, the live range for L2 will be [16r,16d)[64r,64d).  Now, that will prevent the def at 16 from reaching the use at 72. Instead, the def at 64r will reach it (in the same fashion as a def produced by an IMPLICIT_DEF would).

What are your thoughts about it?  There are a few places in the code that will need to be made aware of this (register coalescer is one of them).  Do you have any other suggestions?


Repository:
  rL LLVM

http://reviews.llvm.org/D21189





More information about the llvm-commits mailing list