From 344e919b1a33cd69fe023cbe5a49bbdf4f5ea037 Mon Sep 17 00:00:00 2001 From: Min-Yih Hsu Date: Fri, 28 May 2021 09:35:20 -0700 Subject: [PATCH] [CodeGen][NFC] Remove unused virtual function `TargetFrameLowering::emitCalleeSavedFrameMoves` with 4 arguments is not used anywhere in CodeGen. Thus it shouldn't be exposed as a virtual function. NFC. Differential Revision: https://reviews.llvm.org/D103328 --- llvm/include/llvm/CodeGen/TargetFrameLowering.h | 5 ----- llvm/lib/Target/M68k/M68kFrameLowering.cpp | 6 +++--- llvm/lib/Target/M68k/M68kFrameLowering.h | 7 +++---- llvm/lib/Target/X86/X86FrameLowering.h | 3 +-- 4 files changed, 7 insertions(+), 14 deletions(-) diff --git a/llvm/include/llvm/CodeGen/TargetFrameLowering.h b/llvm/include/llvm/CodeGen/TargetFrameLowering.h index 69b4916..fa22ca6 100644 --- a/llvm/include/llvm/CodeGen/TargetFrameLowering.h +++ b/llvm/include/llvm/CodeGen/TargetFrameLowering.h @@ -216,11 +216,6 @@ public: emitCalleeSavedFrameMoves(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI) const {} - virtual void emitCalleeSavedFrameMoves(MachineBasicBlock &MBB, - MachineBasicBlock::iterator MBBI, - const DebugLoc &DL, - bool IsPrologue) const {} - /// Replace a StackProbe stub (if any) with the actual probe code inline virtual void inlineStackProbe(MachineFunction &MF, MachineBasicBlock &PrologueMBB) const {} diff --git a/llvm/lib/Target/M68k/M68kFrameLowering.cpp b/llvm/lib/Target/M68k/M68kFrameLowering.cpp index 749a5dc..26262b9 100644 --- a/llvm/lib/Target/M68k/M68kFrameLowering.cpp +++ b/llvm/lib/Target/M68k/M68kFrameLowering.cpp @@ -447,9 +447,9 @@ void M68kFrameLowering::BuildCFI(MachineBasicBlock &MBB, .addCFIIndex(CFIIndex); } -void M68kFrameLowering::emitCalleeSavedFrameMoves( +void M68kFrameLowering::emitPrologueCalleeSavedFrameMoves( MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, - const DebugLoc &DL, bool IsProlog) const { + const DebugLoc &DL) const { MachineFunction &MF = *MBB.getParent(); MachineFrameInfo &MFI = MF.getFrameInfo(); MachineModuleInfo &MMI = MF.getMMI(); @@ -656,7 +656,7 @@ void M68kFrameLowering::emitPrologue(MachineFunction &MF, // Emit DWARF info specifying the offsets of the callee-saved registers. if (PushedRegs) - emitCalleeSavedFrameMoves(MBB, MBBI, DL, true); + emitPrologueCalleeSavedFrameMoves(MBB, MBBI, DL); } // TODO Interrupt handlers diff --git a/llvm/lib/Target/M68k/M68kFrameLowering.h b/llvm/lib/Target/M68k/M68kFrameLowering.h index c953f85..0eba9e0 100644 --- a/llvm/lib/Target/M68k/M68kFrameLowering.h +++ b/llvm/lib/Target/M68k/M68kFrameLowering.h @@ -57,10 +57,9 @@ class M68kFrameLowering : public TargetFrameLowering { void BuildCFI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, const MCCFIInstruction &CFIInst) const; - void emitCalleeSavedFrameMoves(MachineBasicBlock &MBB, - MachineBasicBlock::iterator MBBI, - const DebugLoc &DL, - bool IsProlog) const override; + void emitPrologueCalleeSavedFrameMoves(MachineBasicBlock &MBB, + MachineBasicBlock::iterator MBBI, + const DebugLoc &DL) const; unsigned getPSPSlotOffsetFromSP(const MachineFunction &MF) const; diff --git a/llvm/lib/Target/X86/X86FrameLowering.h b/llvm/lib/Target/X86/X86FrameLowering.h index 322aa6f..6309b8a 100644 --- a/llvm/lib/Target/X86/X86FrameLowering.h +++ b/llvm/lib/Target/X86/X86FrameLowering.h @@ -65,8 +65,7 @@ public: void emitCalleeSavedFrameMoves(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, - const DebugLoc &DL, - bool IsPrologue) const override; + const DebugLoc &DL, bool IsPrologue) const; /// emitProlog/emitEpilog - These methods insert prolog and epilog code into /// the function. -- 2.7.4