[llvm] [CodeGen] Refactor `determineCalleeSaves`. (PR #166763)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 6 08:11:13 PST 2025
================
@@ -390,9 +390,38 @@ class LLVM_ABI TargetFrameLowering {
/// This method should not be called by any passes outside of PEI, because
/// it may change state passed in by \p MF and \p RS. The preferred
/// interface outside PEI is getCalleeSaves.
+ // LLVM_DEPRECATED("Use determinePrologCalleeSaves instead",
+ // "determinePrologCalleeSaves")
virtual void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs,
RegScavenger *RS = nullptr) const;
+ /// Return the list of registers which must be preserved by the function: the
+ /// value on exit must be the same as the value on entry. A register from this
+ /// list does not need to be saved / reloaded if the function did not use it.
+ const MCPhysReg *getMustPreserveRegisters(MachineFunction &MF) const;
----------------
arsenm wrote:
```suggestion
const MCPhysReg *getMustPreserveRegisters(const MachineFunction &MF) const;
```
https://github.com/llvm/llvm-project/pull/166763
More information about the llvm-commits
mailing list