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?
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).
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?
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