[LLVMdev] live information

Jonas Paulsson jnspaulsson at hotmail.com
Mon Jul 25 07:18:29 PDT 2011


Hi,

I'm working on live intervals and I'm curious about how LLVM typically would represent live info. Take the following case (after SimpleRegisterCoalescer):

BB#3: derived from LLVM BB %bb.nph
    Live Ins: %a0_h
    Predecessors according to CFG: BB#2
    %reg16500<def> = COPY %reg16499
    Successors according to CFG: BB#4

BB#4: derived from LLVM BB %for.body21
    Live Ins: %a0_h
    Predecessors according to CFG: BB#3 BB#4
    %reg16500<def> = add_twoAddr %reg16500, 1

    cmp_branch <BB#4>, %reg16500, %a0_h
    Successors according to CFG: BB#4 BB#5

BB#4 is a loop.

%reg16500 is first defined by a COPY, then updated at each iteration and used at the end as well of BB#4. 

Live ins(BB#4) should include %reg16500 (Simple register coalescer did not care for this)
LiveRanges should be from the def in BB#3 to end of BB#3, from start of BB#4 to the add MI, from the add MI to the compare&branch MI.

Am I correct?


I am trying to recompute live-info after the coalescer, so I also wonder if any or both of the add and cmp_branch MI's should have kill-flags for %reg16500?

Thanks,

Jonas


 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110725/eb173f7d/attachment.html>


More information about the llvm-dev mailing list