[llvm] [X86][IPRA] Add getIPRACSRegs since frame registers are risked to be optimized out. (PR #109597)

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 14:31:00 PDT 2024


================
@@ -489,6 +489,12 @@ class TargetRegisterInfo : public MCRegisterInfo {
   virtual const MCPhysReg*
   getCalleeSavedRegs(const MachineFunction *MF) const = 0;
 
+  /// Return a null-terminated list of all of the callee-saved registers on
+  /// this target when IPRA is on. Normally, this list should be null.
----------------
rnk wrote:

Please expand on this comment. The list should include any non-allocatable registers that the backend uses and assumes will be saved by all calling conventions. This is typically the ISA-standard frame pointer, but could include the thread pointer, TOC pointer, or base pointer for different targets.

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


More information about the llvm-commits mailing list