[llvm] [RISCV] Remove CalleeSavedInfo for Zcmp/save-restore-libcalls registers (PR #79535)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 8 09:18:59 PST 2024
topperc wrote:
> > Could this patch affect Inter Procedural Register Allocation? I'm seeing a regression and I'm guess this could be related.
>
> hmm, PEI runs post-ra, right? I don't know how IPRA works and what is the state of each function when it runs, but this should only be apparent post-PEI.
>
> It does seem like `LiveRegUnits` uses `MFI.getCalleeSavedInfo` for pristine registers, so maybe there is something related there?
>
> ```
> llvm/lib/CodeGen/LiveRegUnits.cpp
> 102: const auto &CSI = MFI.getCalleeSavedInfo();
> 122: for (const CalleeSavedInfo &Info : MFI.getCalleeSavedInfo())
> 133: for (const CalleeSavedInfo &Info : MFI.getCalleeSavedInfo())
> ```
IPRA has a pass that collects which registers a function uses. That is used to update the regmask for call sites in its callers. I think that collection pass runs after PEI.
https://github.com/llvm/llvm-project/pull/79535
More information about the llvm-commits
mailing list