aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86/X86FrameLowering.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-05-15 22:27:35 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-05-15 22:27:35 +0000
commit377b2270124f6f566c0f291bcb02f7755b642c2c (patch)
treee05ebfbda32879269827456e905204df88316ea5 /lib/Target/X86/X86FrameLowering.cpp
parent55a6f111fc0470d45afed19e236ebeecdba8ce9f (diff)
downloadexternal_llvm-377b2270124f6f566c0f291bcb02f7755b642c2c.zip
external_llvm-377b2270124f6f566c0f291bcb02f7755b642c2c.tar.gz
external_llvm-377b2270124f6f566c0f291bcb02f7755b642c2c.tar.bz2
Delete dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181941 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86FrameLowering.cpp')
-rw-r--r--lib/Target/X86/X86FrameLowering.cpp28
1 files changed, 9 insertions, 19 deletions
diff --git a/lib/Target/X86/X86FrameLowering.cpp b/lib/Target/X86/X86FrameLowering.cpp
index b9254d2..942df6c 100644
--- a/lib/Target/X86/X86FrameLowering.cpp
+++ b/lib/Target/X86/X86FrameLowering.cpp
@@ -763,15 +763,10 @@ void X86FrameLowering::emitPrologue(MachineFunction &MF) const {
.addSym(FrameLabel);
// Define the current CFA rule to use the provided offset.
- if (StackSize) {
- MachineLocation SPDst(MachineLocation::VirtualFP);
- MachineLocation SPSrc(MachineLocation::VirtualFP, 2 * stackGrowth);
- MMI.addFrameMove(FrameLabel, SPDst, SPSrc);
- } else {
- MachineLocation SPDst(StackPtr);
- MachineLocation SPSrc(StackPtr, stackGrowth);
- MMI.addFrameMove(FrameLabel, SPDst, SPSrc);
- }
+ assert(StackSize);
+ MachineLocation SPDst(MachineLocation::VirtualFP);
+ MachineLocation SPSrc(MachineLocation::VirtualFP, 2 * stackGrowth);
+ MMI.addFrameMove(FrameLabel, SPDst, SPSrc);
// Change the rule for the FramePtr to be an "offset" rule.
MachineLocation FPDst(MachineLocation::VirtualFP, 2 * stackGrowth);
@@ -959,16 +954,11 @@ void X86FrameLowering::emitPrologue(MachineFunction &MF) const {
if (!HasFP && NumBytes) {
// Define the current CFA rule to use the provided offset.
- if (StackSize) {
- MachineLocation SPDst(MachineLocation::VirtualFP);
- MachineLocation SPSrc(MachineLocation::VirtualFP,
- -StackSize + stackGrowth);
- MMI.addFrameMove(Label, SPDst, SPSrc);
- } else {
- MachineLocation SPDst(StackPtr);
- MachineLocation SPSrc(StackPtr, stackGrowth);
- MMI.addFrameMove(Label, SPDst, SPSrc);
- }
+ assert(StackSize);
+ MachineLocation SPDst(MachineLocation::VirtualFP);
+ MachineLocation SPSrc(MachineLocation::VirtualFP,
+ -StackSize + stackGrowth);
+ MMI.addFrameMove(Label, SPDst, SPSrc);
}
// Emit DWARF info specifying the offsets of the callee-saved registers.