[llvm-commits] CVS: llvm/lib/Target/X86/X86RegisterInfo.cpp
Evan Cheng
evan.cheng at apple.com
Tue Jan 23 01:38:26 PST 2007
Changes in directory llvm/lib/Target/X86:
X86RegisterInfo.cpp updated: 1.193 -> 1.194
---
Log message:
PEI is now responsible for adding MaxCallFrameSize to frame size and align the stack. Each target can further adjust the frame size if necessary.
---
Diffs of the changes: (+0 -17)
X86RegisterInfo.cpp | 17 -----------------
1 files changed, 17 deletions(-)
Index: llvm/lib/Target/X86/X86RegisterInfo.cpp
diff -u llvm/lib/Target/X86/X86RegisterInfo.cpp:1.193 llvm/lib/Target/X86/X86RegisterInfo.cpp:1.194
--- llvm/lib/Target/X86/X86RegisterInfo.cpp:1.193 Mon Jan 22 18:57:47 2007
+++ llvm/lib/Target/X86/X86RegisterInfo.cpp Tue Jan 23 03:38:11 2007
@@ -991,29 +991,12 @@
MachineBasicBlock::iterator MBBI = MBB.begin();
MachineFrameInfo *MFI = MF.getFrameInfo();
unsigned Align = MF.getTarget().getFrameInfo()->getStackAlignment();
- unsigned AlignMask = Align - 1;
const Function* Fn = MF.getFunction();
const X86Subtarget* Subtarget = &MF.getTarget().getSubtarget<X86Subtarget>();
MachineInstr *MI;
// Get the number of bytes to allocate from the FrameInfo
unsigned NumBytes = MFI->getStackSize();
- if (MFI->hasCalls() || MFI->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.
- //
- 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
- // is a leaf function.
- NumBytes = (((NumBytes+SlotSize) + AlignMask) & ~AlignMask) - SlotSize;
- }
-
- // Update frame info to pretend that this is part of the stack...
- MFI->setStackSize(NumBytes);
if (NumBytes) { // adjust stack pointer: ESP -= numbytes
if (NumBytes >= 4096 && Subtarget->isTargetCygMing()) {
More information about the llvm-commits
mailing list