[llvm-dev] Liveness of virtual registers

Krzysztof Parzyszek via llvm-dev llvm-dev at lists.llvm.org
Thu Jul 28 13:42:49 PDT 2016

On 7/28/2016 3:37 PM, Xiaochu Liu via llvm-dev wrote:
> I am trying to use liveness of a variable while writing a
> machinefunction pass. But it seems that some virtual registers are not
> marked as dead while they should be (never used by anything else). I get
> those info by callings isDead or isDef function for that MachineOperand
> (vreg). Is there a way to get more accurate liveness info?

The absence of these flags does not mean anything, but if they are 
present, then they must be correct.

You can always use functions use_empty and use_nodbg_empty, both in 
MachineRegisterInfo.  A precise liveness information is calculated by 
Live Interval Analysis.


Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation

More information about the llvm-dev mailing list