summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86RegisterInfo.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-01-20 10:17:53 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-01-20 10:17:53 +0000
commit706b6797a01d4824f49bd09919725f70eb0cbdbb (patch)
tree3888d23c077ea75a123a5a2316a64d50096412cd /llvm/lib/Target/X86/X86RegisterInfo.cpp
parentb2681843633f710e6997d1c27296ee4c45c4e11b (diff)
downloadbcm5719-llvm-706b6797a01d4824f49bd09919725f70eb0cbdbb.tar.gz
bcm5719-llvm-706b6797a01d4824f49bd09919725f70eb0cbdbb.zip
One more try...
llvm-svn: 33400
Diffstat (limited to 'llvm/lib/Target/X86/X86RegisterInfo.cpp')
-rw-r--r--llvm/lib/Target/X86/X86RegisterInfo.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86RegisterInfo.cpp b/llvm/lib/Target/X86/X86RegisterInfo.cpp
index 477267ad56a..3579b8439ae 100644
--- a/llvm/lib/Target/X86/X86RegisterInfo.cpp
+++ b/llvm/lib/Target/X86/X86RegisterInfo.cpp
@@ -998,12 +998,13 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const {
// Get the number of bytes to allocate from the FrameInfo
unsigned NumBytes = MFI->getStackSize();
- if (MFI->hasCalls() && !hasFP(MF))
+ if (MFI->hasCalls() || MF.getFrameInfo()->hasVarSizedObjects()) {
// When we have no frame pointer, we reserve argument space for call sites
// in the function immediately on entry to the current function. This
// eliminates the need for add/sub ESP brackets around call sites.
//
- NumBytes += MFI->getMaxCallFrameSize();
+ if (!hasFP(MF))
+ NumBytes += MFI->getMaxCallFrameSize();
// Round the size to a multiple of the alignment (don't forget the 4/8 byte
// offset pushed by the caller though). No need to align the stack if this
OpenPOWER on IntegriCloud