[LLVMdev] How to get register liveness information for each MachineBasicBlock

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue Mar 22 19:21:45 PDT 2011


On Mar 21, 2011, at 3:46 AM, Dongrui She wrote:

> Hi all,
> 
> I try to print the live-in and live-out registers for each basic block in a backend for my own target.
> And I can get a list of live-in registers directly in MachineBasicBlock.
> 
> Is there a quick way to also get the list of live-out registers without redoing the analysis. I think 
> this information is computed and stored somewhere.

This information is not available. You can compute the live-out set as the union of the live-in sets of all successor blocks.

Note that the live-in lists only contain physical registers. Register allocation computes liveness information for virtual registers in the LiveIntervals analysis.

/jakob





More information about the llvm-dev mailing list