aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-12-16 17:42:40 +0000
committerChris Lattner <sabre@nondot.org>2002-12-16 17:42:40 +0000
commit69c198863db1daccb2c80c2122c335a169d6b573 (patch)
treee9dc90cbb2adf3cf54fe2b6fb50f98e4631e2beb /lib
parent00032bf6cc236b1fb534f74b1ac288f611a86804 (diff)
downloadexternal_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')
-rw-r--r--lib/CodeGen/RegAllocSimple.cpp4
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);