[llvm-branch-commits] [llvm] [LivePhysRegs] Add callee-saved regs from MFI in addLiveOutsNoPristines. (PR #73553)

Florian Hahn via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Nov 27 11:14:23 PST 2023


fhahn wrote:

> Is this about computing **live-outs** of the return block as the code suggests? (The summary currently talks about live-ins?)

Thanks, it should be **live-outs** in the description, updated!

> I don't remember the situation on aarch64, but if by chance LR is modeled with this "pristine register" concept, then maybe the caller needs to use addLiveIns() rather than addLiveInsNoPristines()?

I am not sure, but looking at `updateLiveness` (https://github.com/llvm/llvm-project/blob/main/llvm/lib/CodeGen/PrologEpilogInserter.cpp#L582) it looks like it uses the saved registers from MFI. Pristine registers I think contain all callee-saved registers for the target, which may be overestimating the liveness quite a bit.



https://github.com/llvm/llvm-project/pull/73553


More information about the llvm-branch-commits mailing list