[llvm] [SPARC] Preserve liveins after leaf register remapping (PR #213359)

Kirill A. Korinsky via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 8 15:41:21 PDT 2026


================
@@ -259,53 +264,53 @@ SparcFrameLowering::getFrameIndexReference(const MachineFunction &MF, int FI,
   return true;
 }
 
-bool SparcFrameLowering::isLeafProc(MachineFunction &MF) const
-{
-
-  MachineRegisterInfo &MRI = MF.getRegInfo();
-  MachineFrameInfo    &MFI = MF.getFrameInfo();
-
-  return !(MFI.hasCalls()               // has calls
-           || MRI.isPhysRegUsed(SP::L0) // Too many registers needed
-           || MRI.isPhysRegUsed(SP::O6) // %sp is used
-           || hasFP(MF)                 // need %fp
-           || MF.hasInlineAsm());       // has inline assembly
+bool SparcFrameLowering::isLeafProc(MachineFunction &MF,
+                                    bool UsesLocalRegister) const {
+  if (MF.getFrameInfo().hasCalls() || hasFP(MF) || MF.hasInlineAsm() ||
----------------
catap wrote:

Ooops. Fixed

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


More information about the llvm-commits mailing list