[llvm-commits] CVS: llvm/lib/Target/X86/X86RegisterInfo.cpp
Evan Cheng
evan.cheng at apple.com
Fri Jan 19 18:08:32 PST 2007
Changes in directory llvm/lib/Target/X86:
X86RegisterInfo.cpp updated: 1.189 -> 1.190
---
Log message:
Backend is reponsible for aligning the stack.
---
Diffs of the changes: (+5 -7)
X86RegisterInfo.cpp | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
Index: llvm/lib/Target/X86/X86RegisterInfo.cpp
diff -u llvm/lib/Target/X86/X86RegisterInfo.cpp:1.189 llvm/lib/Target/X86/X86RegisterInfo.cpp:1.190
--- llvm/lib/Target/X86/X86RegisterInfo.cpp:1.189 Fri Jan 12 13:20:47 2007
+++ llvm/lib/Target/X86/X86RegisterInfo.cpp Fri Jan 19 20:08:16 2007
@@ -997,18 +997,16 @@
// Get the number of bytes to allocate from the FrameInfo
unsigned NumBytes = MFI->getStackSize();
- if (MFI->hasCalls() || MF.getFrameInfo()->hasVarSizedObjects()) {
+ if (MFI->hasCalls() && !hasFP(MF))
// 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.
//
- if (!hasFP(MF))
- NumBytes += MFI->getMaxCallFrameSize();
+ NumBytes += MFI->getMaxCallFrameSize();
- // Round the size to a multiple of the alignment (don't forget the 4/8 byte
- // offset though).
- NumBytes = ((NumBytes+SlotSize)+Align-1)/Align*Align - SlotSize;
- }
+ // Round the size to a multiple of the alignment (don't forget the 4/8 byte
+ // offset though).
+ NumBytes = ((NumBytes+SlotSize)+Align-1)/Align*Align - SlotSize;
// Update frame info to pretend that this is part of the stack...
MFI->setStackSize(NumBytes);
More information about the llvm-commits
mailing list