[LLVMdev] Liveness information still usable after register allocation?

Iain Sandoe
Thu, 21 Aug 2014 17:18:43 -0000

On 21 Aug 2014, at 17:11, Jonathan Roelofs 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).

you might also want to look at TargetRegisterInfo::trackLivenessAfterRegAlloc().
Iain

>
> 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
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev