[llvm-dev] live-in lists: new verification and isLiveOut() method

Jonas Paulsson via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 22 00:56:32 PDT 2019

Ping!  (this was sent originally on Oct 15/)./


I have proposed a patch to address the issue discussed previously about
the live-in lists and their trustworthiness. In short, some
optimizations depend on checking if a physical register is live out of
MBB and this should preferably be the case only if that register is in
one of MBBs successors live-in list. The SystemZ backend does this check
in SystemZElimCompare.cpp:isCCLiveOut(), but it would have been much
preferred to have this done by a method in common-code. Note that this
is now intended for use for a non-allocatable, non-reserved register and
does not depend on or help register allocation.

My patch adds a check for the live-through case of live-in lists in the
MachineVerifier and moves the method that checks the live-in lists of
the successors to MachineBasicBlock:

/// Return true if the specified physical register is in the live in set of
/// any of the successor blocks. If false is returned, Reg is guaranteed to
/// not be live out, although sub/super-registers are not checked. This can
/// be called both before and after regalloc.
bool isLiveOut(MCRegister PhysReg) const;

I would like to know if anyone would be in favor of having this here
with a stated guarantee as in the comment, or if there are any
objections to it?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191022/53cbc115/attachment.html>

More information about the llvm-dev mailing list