[llvm-dev] Liveness of virtual registers
Matthias Braun via llvm-dev
llvm-dev at lists.llvm.org
Thu Jul 28 13:49:21 PDT 2016
The isKill must be correct if present, but a vreg may still be killed even if the operand has no Kill flag.
The isDead and isUndef flags however are required to be correct. We need further details to say anything about your problem, a LiveIntervals::dump() dump for example would be helpful to assess whether the liveness data is correct in your case.
> On Jul 28, 2016, at 1:42 PM, Krzysztof Parzyszek via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 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
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
More information about the llvm-dev