[PATCH] D12042: Remove redundant TargetFrameLowering::getFrameIndexOffset virtual function.
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 14 15:39:49 PDT 2015
rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.
lgtm
This adds a bunch of unused variables, but they should've been red flags anyway.
================
Comment at: lib/Target/X86/X86FrameLowering.cpp:1199-1201
@@ -1199,1 +1198,5 @@
+// Simplified from getFrameIndexReference keeping only StackPointer cases
+int X86FrameLowering::getFrameIndexReferenceFromSP(const MachineFunction &MF,
+ int FI,
+ unsigned &FrameReg) const {
const MachineFrameInfo *MFI = MF.getFrameInfo();
----------------
I guess adding the outparam here would simplify the calling register info code.
================
Comment at: lib/Target/X86/X86RegisterInfo.cpp:495-496
@@ -494,1 +494,4 @@
+
+ // FIXME: should/can this function use the FrameReg output of
+ // getFrameIndexReference instead of re-creating the logic here?
if (hasBasePointer(MF))
----------------
Currently, no. This code handles fixed stack objects (FI < 0) and AfterFPPop, while the frame lowering code does not. Eventually, maybe. :)
http://reviews.llvm.org/D12042
More information about the llvm-commits
mailing list