diff options
author | Chris Lattner <sabre@nondot.org> | 2002-12-16 17:42:40 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-12-16 17:42:40 +0000 |
commit | 69c198863db1daccb2c80c2122c335a169d6b573 (patch) | |
tree | e9dc90cbb2adf3cf54fe2b6fb50f98e4631e2beb /lib/CodeGen/RegAllocSimple.cpp | |
parent | 00032bf6cc236b1fb534f74b1ac288f611a86804 (diff) | |
download | external_llvm-69c198863db1daccb2c80c2122c335a169d6b573.zip external_llvm-69c198863db1daccb2c80c2122c335a169d6b573.tar.gz external_llvm-69c198863db1daccb2c80c2122c335a169d6b573.tar.bz2 |
Keep the stack frame aligned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocSimple.cpp')
-rw-r--r-- | lib/CodeGen/RegAllocSimple.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/RegAllocSimple.cpp b/lib/CodeGen/RegAllocSimple.cpp index 9ed6ad9..925915e 100644 --- a/lib/CodeGen/RegAllocSimple.cpp +++ b/lib/CodeGen/RegAllocSimple.cpp @@ -324,6 +324,10 @@ bool RegAllocSimple::runOnMachineFunction(MachineFunction &Fn) { MBB != MBBe; ++MBB) AllocateBasicBlock(*MBB); + // Round stack allocation up to a nice alignment to keep the stack aligned + // FIXME: This is X86 specific! Move to frame manager + NumBytesAllocated = (NumBytesAllocated + 3) & ~3; + // Add prologue to the function... RegInfo->emitPrologue(Fn, NumBytesAllocated); |