[LLVMdev] Liveness information still usable after register allocation?

Alex S alexmountain13 at gmail.com
Thu Aug 21 10:15:52 PDT 2014


Hi Jonathan,

Thanks for your advice. It seems that the implementation
of MachineBasicBlock::computeRegisterLiveness is
limited to one MachineBasicBlock. If I want to get Live-in registers after
register allocation, using the method
you mentioned, I have to do the data flow analysis for the whole program.
Is that correct?

Again thanks for your help!

Best regards,
Alex




On Thu, Aug 21, 2014 at 12:11 PM, Jonathan Roelofs <
jonathan at codesourcery.com> wrote:

>
>
> On 8/21/14, 9:54 AM, Alex S wrote:
>
>> Hi all,
>>
>> Sorry to bother those not interested in this problem.
>>
>> I have a problem while I want to reuse the liveness information after
>> register
>> allocation.
>> When I use the livein_begin() from MachineBasicBlock to get the live-in
>> registers after
>> register alloction. I found that the liveness information is sometime
>> incorrect.
>> For example,
>> some registers should be live-in to the machine basic block as these
>> registers
>> are upward exposed
>> in this machine basic block.
>>
>> Therefore, I wonder whether there are any liveness analysis available
>> after
>> register allocation.
>> Or, did I misunderstand it?
>>
> I was looking for post-RA liveness the other day and ran into:
> MachineBasicBlock::computeRegisterLiveness, does it do what you want?
>
> The neighborhood thing seemed a bit wonky for what I needed at the time,
> so I didn't end up using it, and in turn pursued a different solution to my
> problem that didn't need post-RA liveness (I'd need the neighborhood to be
> the whole basic block, and that seemed a bit awkward).
>
>
> HTH,
>
> Jon
>
>>
>> Thanks,
>> Alex
>>
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>>
> --
> Jon Roelofs
> jonathan at codesourcery.com
> CodeSourcery / Mentor Embedded
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140821/30a94bc7/attachment.html>


More information about the llvm-dev mailing list