[llvm] e7813a9 - Delete unneeded X86RegisterInfo::hasReservedSpillSlot. NFC

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 17 23:19:00 PDT 2020


Author: Fangrui Song
Date: 2020-10-17T23:18:55-07:00
New Revision: e7813a930a2c0c3a196cc145f1b4df80b4238fd8

URL: https://github.com/llvm/llvm-project/commit/e7813a930a2c0c3a196cc145f1b4df80b4238fd8
DIFF: https://github.com/llvm/llvm-project/commit/e7813a930a2c0c3a196cc145f1b4df80b4238fd8.diff

LOG: Delete unneeded X86RegisterInfo::hasReservedSpillSlot. NFC

Only PowerPC and RISCV need to override it.

Added: 
    

Modified: 
    llvm/lib/Target/X86/X86RegisterInfo.cpp
    llvm/lib/Target/X86/X86RegisterInfo.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/X86/X86RegisterInfo.cpp b/llvm/lib/Target/X86/X86RegisterInfo.cpp
index 2636cbd27469..84084f157c30 100644
--- a/llvm/lib/Target/X86/X86RegisterInfo.cpp
+++ b/llvm/lib/Target/X86/X86RegisterInfo.cpp
@@ -665,13 +665,6 @@ bool X86RegisterInfo::canRealignStack(const MachineFunction &MF) const {
   return true;
 }
 
-bool X86RegisterInfo::hasReservedSpillSlot(const MachineFunction &MF,
-                                           Register Reg, int &FrameIdx) const {
-  // Since X86 defines assignCalleeSavedSpillSlots which always return true
-  // this function neither used nor tested.
-  llvm_unreachable("Unused function on X86. Otherwise need a test case.");
-}
-
 // tryOptimizeLEAtoMOV - helper function that tries to replace a LEA instruction
 // of the form 'lea (%esp), %ebx' --> 'mov %esp, %ebx'.
 // TODO: In this case we should be really trying first to entirely eliminate

diff  --git a/llvm/lib/Target/X86/X86RegisterInfo.h b/llvm/lib/Target/X86/X86RegisterInfo.h
index 56cb8909c520..d23cf7f48ad9 100644
--- a/llvm/lib/Target/X86/X86RegisterInfo.h
+++ b/llvm/lib/Target/X86/X86RegisterInfo.h
@@ -121,9 +121,6 @@ class X86RegisterInfo final : public X86GenRegisterInfo {
 
   bool canRealignStack(const MachineFunction &MF) const override;
 
-  bool hasReservedSpillSlot(const MachineFunction &MF, Register Reg,
-                            int &FrameIdx) const override;
-
   void eliminateFrameIndex(MachineBasicBlock::iterator MI,
                            int SPAdj, unsigned FIOperandNum,
                            RegScavenger *RS = nullptr) const override;


        


More information about the llvm-commits mailing list