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

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 13 06:37:49 PDT 2016


kparzysz added a comment.

Regarding the list of "undefs":

The main problem here is that this information should be available even after the initial calculation of the live range.  The main consumers of this data are the extending routines (e.g. LIS::extendToIndices).  In the absence of the explicit list of "undefs", in some circumstances, they could extend the live range "too much", i.e. the range would cover code where the corresponding subregister is not live.  Such a scenario could happen when live range splitting breaks a live range at a point where the register is only partially defined:

  BB#123:
    ...
    %vreg0:sub0<def,read-undef> = ...
    ...
    %vreg0:sub1<def> = ...
    ...

Splitting of the range between the definitions of sub0 and sub1 could create this case:

  BB#123:
    ...
    %vreg1:sub0<def,read-undef> = ...
    ...
    %vreg2<def> = COPY %vreg1   ; vreg1:sub1 is undefined
    %vreg2:sub1<def> = ...
    ...

At this point, an extension of the live range for vreg1:sub1 could include instructions between the sub0<def,read-undef> and the use of vreg1.  (I'm writing this from memory---I don't have an example at hand that I could paste here.)


Repository:
  rL LLVM

http://reviews.llvm.org/D21189





More information about the llvm-commits mailing list