[llvm] 344e919 - [CodeGen][NFC] Remove unused virtual function
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 2 13:13:26 PDT 2021
Author: Min-Yih Hsu
Date: 2021-06-02T13:11:12-07:00
New Revision: 344e919b1a33cd69fe023cbe5a49bbdf4f5ea037
URL: https://github.com/llvm/llvm-project/commit/344e919b1a33cd69fe023cbe5a49bbdf4f5ea037
DIFF: https://github.com/llvm/llvm-project/commit/344e919b1a33cd69fe023cbe5a49bbdf4f5ea037.diff
LOG: [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
Added:
Modified:
llvm/include/llvm/CodeGen/TargetFrameLowering.h
llvm/lib/Target/M68k/M68kFrameLowering.cpp
llvm/lib/Target/M68k/M68kFrameLowering.h
llvm/lib/Target/X86/X86FrameLowering.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/TargetFrameLowering.h b/llvm/include/llvm/CodeGen/TargetFrameLowering.h
index 69b491662d8d..fa22ca6a98ac 100644
--- a/llvm/include/llvm/CodeGen/TargetFrameLowering.h
+++ b/llvm/include/llvm/CodeGen/TargetFrameLowering.h
@@ -216,11 +216,6 @@ class TargetFrameLowering {
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 749a5dc8f777..26262b9b573d 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 c953f855910d..0eba9e08d858 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 322aa6fbbfb8..6309b8a066c4 100644
--- a/llvm/lib/Target/X86/X86FrameLowering.h
+++ b/llvm/lib/Target/X86/X86FrameLowering.h
@@ -65,8 +65,7 @@ class X86FrameLowering : public TargetFrameLowering {
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.
More information about the llvm-commits
mailing list