[llvm-commits] CVS: llvm/lib/CodeGen/RegAllocSimple.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Dec 16 11:43:01 PST 2002


Changes in directory llvm/lib/CodeGen:

RegAllocSimple.cpp updated: 1.29 -> 1.30

---
Log message:

Keep the stack frame aligned.


---
Diffs of the changes:

Index: llvm/lib/CodeGen/RegAllocSimple.cpp
diff -u llvm/lib/CodeGen/RegAllocSimple.cpp:1.29 llvm/lib/CodeGen/RegAllocSimple.cpp:1.30
--- llvm/lib/CodeGen/RegAllocSimple.cpp:1.29	Mon Dec 16 08:37:00 2002
+++ llvm/lib/CodeGen/RegAllocSimple.cpp	Mon Dec 16 11:42:40 2002
@@ -324,6 +324,10 @@
        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);
 





More information about the llvm-commits mailing list