summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-07-14 01:16:18 +0000
committerBill Wendling <isanbard@gmail.com>2009-07-14 01:16:18 +0000
commit7d43cd8f3ef877570190d28c6f326d05ae820fbc (patch)
tree7b0807d514cb8b2d42b686d25197aeed14f9adf6 /lib
parent65d1e2b6e74fcd370093cbe518ebc15cbc445ad4 (diff)
downloadllvm-7d43cd8f3ef877570190d28c6f326d05ae820fbc.tar.gz
llvm-7d43cd8f3ef877570190d28c6f326d05ae820fbc.tar.bz2
llvm-7d43cd8f3ef877570190d28c6f326d05ae820fbc.tar.xz
Remove hack now that Evan fixed it so that the frame pointer isn't saved twice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75581 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/X86RegisterInfo.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp
index 6bb05c5ebe..3ae758b7bf 100644
--- a/lib/Target/X86/X86RegisterInfo.cpp
+++ b/lib/Target/X86/X86RegisterInfo.cpp
@@ -691,29 +691,6 @@ void X86RegisterInfo::emitCalleeSavedFrameMoves(MachineFunction &MF,
unsigned Reg = I->getReg();
Offset = MaxOffset - Offset + saveAreaOffset;
- // Don't output a new machine move if we're re-saving the frame
- // pointer. This happens when the PrologEpilogInserter has inserted an extra
- // "PUSH" of the frame pointer -- the "emitPrologue" method automatically
- // generates one when frame pointers are used. If we generate a "machine
- // move" for this extra "PUSH", the linker will lose track of the fact that
- // the frame pointer should have the value of the first "PUSH" when it's
- // trying to unwind.
- //
- // FIXME: This looks inelegant. It's possibly correct, but it's covering up
- // another bug. I.e., one where we generate a prolog like this:
- //
- // pushl %ebp
- // movl %esp, %ebp
- // pushl %ebp
- // pushl %esi
- // ...
- //
- // The immediate re-push of EBP is unnecessary. At the least, it's an
- // optimization bug. EBP can be used as a scratch register in certain
- // cases, but probably not when we have a frame pointer.
- if (HasFP && FramePtr == Reg)
- continue;
-
MachineLocation CSDst(MachineLocation::VirtualFP, Offset);
MachineLocation CSSrc(Reg);
Moves.push_back(MachineMove(LabelId, CSDst, CSSrc));