[PATCH] D114140: [CodeGen] Rename emitCalleeSavedFrameMoves
Alexander Shaposhnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 17 22:30:07 PST 2021
alexander-shaposhnikov created this revision.
alexander-shaposhnikov added reviewers: dblaikie, tmsriram.
alexander-shaposhnikov created this object with visibility "All Users".
Herald added subscribers: pengfei, hiraditya, kristof.beyls.
alexander-shaposhnikov requested review of this revision.
Herald added a project: LLVM.
This diff renames emitCalleeSavedFrameMoves to avoid conflicts with non-virtual methods of derived classes having the same name but different semantics.
E.g. previously AArch64FrameLowering had (non-virtual) "emitCalleeSavedFrameMoves" but it started to override TargetFrameLowering::emitCalleeSavedFrameMoves after https://github.com/llvm/llvm-project/commit/c3e6555616fd92e21b17fbc27f8c145c27890f1a but its usage and semantics didn't change.
P.S. for x86 there was no conflict because the signature of non-virtual X86FrameLowering::emitCalleeSavedFrameMoves is different
Test plan: make check-all
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D114140
Files:
llvm/include/llvm/CodeGen/TargetFrameLowering.h
llvm/lib/CodeGen/CFIInstrInserter.cpp
llvm/lib/Target/AArch64/AArch64FrameLowering.h
llvm/lib/Target/X86/X86FrameLowering.cpp
llvm/lib/Target/X86/X86FrameLowering.h
Index: llvm/lib/Target/X86/X86FrameLowering.h
===================================================================
--- llvm/lib/Target/X86/X86FrameLowering.h
+++ llvm/lib/Target/X86/X86FrameLowering.h
@@ -59,9 +59,8 @@
void inlineStackProbe(MachineFunction &MF,
MachineBasicBlock &PrologMBB) const override;
- void
- emitCalleeSavedFrameMoves(MachineBasicBlock &MBB,
- MachineBasicBlock::iterator MBBI) const override;
+ void emitCalleeSavedFrameMovesFullCFA(
+ MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI) const override;
void emitCalleeSavedFrameMoves(MachineBasicBlock &MBB,
MachineBasicBlock::iterator MBBI,
Index: llvm/lib/Target/X86/X86FrameLowering.cpp
===================================================================
--- llvm/lib/Target/X86/X86FrameLowering.cpp
+++ llvm/lib/Target/X86/X86FrameLowering.cpp
@@ -434,7 +434,7 @@
/// Emits Dwarf Info specifying offsets of callee saved registers and
/// frame pointer. This is called only when basic block sections are enabled.
-void X86FrameLowering::emitCalleeSavedFrameMoves(
+void X86FrameLowering::emitCalleeSavedFrameMovesFullCFA(
MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI) const {
MachineFunction &MF = *MBB.getParent();
if (!hasFP(MF)) {
Index: llvm/lib/Target/AArch64/AArch64FrameLowering.h
===================================================================
--- llvm/lib/Target/AArch64/AArch64FrameLowering.h
+++ llvm/lib/Target/AArch64/AArch64FrameLowering.h
@@ -26,9 +26,8 @@
: TargetFrameLowering(StackGrowsDown, Align(16), 0, Align(16),
true /*StackRealignable*/) {}
- void
- emitCalleeSavedFrameMoves(MachineBasicBlock &MBB,
- MachineBasicBlock::iterator MBBI) const override;
+ void emitCalleeSavedFrameMoves(MachineBasicBlock &MBB,
+ MachineBasicBlock::iterator MBBI) const;
MachineBasicBlock::iterator
eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,
Index: llvm/lib/CodeGen/CFIInstrInserter.cpp
===================================================================
--- llvm/lib/CodeGen/CFIInstrInserter.cpp
+++ llvm/lib/CodeGen/CFIInstrInserter.cpp
@@ -347,7 +347,7 @@
}
if (ForceFullCFA) {
- MF.getSubtarget().getFrameLowering()->emitCalleeSavedFrameMoves(
+ MF.getSubtarget().getFrameLowering()->emitCalleeSavedFrameMovesFullCFA(
*MBBInfo.MBB, MBBI);
InsertedCFIInstr = true;
PrevMBBInfo = &MBBInfo;
Index: llvm/include/llvm/CodeGen/TargetFrameLowering.h
===================================================================
--- llvm/include/llvm/CodeGen/TargetFrameLowering.h
+++ llvm/include/llvm/CodeGen/TargetFrameLowering.h
@@ -213,8 +213,8 @@
/// With basic block sections, emit callee saved frame moves for basic blocks
/// that are in a different section.
virtual void
- emitCalleeSavedFrameMoves(MachineBasicBlock &MBB,
- MachineBasicBlock::iterator MBBI) const {}
+ emitCalleeSavedFrameMovesFullCFA(MachineBasicBlock &MBB,
+ MachineBasicBlock::iterator MBBI) const {}
/// Replace a StackProbe stub (if any) with the actual probe code inline
virtual void inlineStackProbe(MachineFunction &MF,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114140.388111.patch
Type: text/x-patch
Size: 3384 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211118/3a85ab04/attachment.bin>
More information about the llvm-commits
mailing list