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

Chris Lattner lattner at cs.uiuc.edu
Sun Nov 6 09:43:32 PST 2005



Changes in directory llvm/lib/CodeGen:

PrologEpilogInserter.cpp updated: 1.50 -> 1.51
---
Log message:

Always compute max align.


---
Diffs of the changes:  (+5 -6)

 PrologEpilogInserter.cpp |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)


Index: llvm/lib/CodeGen/PrologEpilogInserter.cpp
diff -u llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.50 llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.51
--- llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.50	Sun Nov  6 03:00:38 2005
+++ llvm/lib/CodeGen/PrologEpilogInserter.cpp	Sun Nov  6 11:43:20 2005
@@ -258,7 +258,7 @@
   MachineFrameInfo *FFI = Fn.getFrameInfo();
 
   unsigned StackAlignment = TFI.getStackAlignment();
-  unsigned MaxAlign = StackAlignment;
+  unsigned MaxAlign = 0;
 
   // Start at the beginning of the local area.
   // The Offset is the distance from the stack top in the direction
@@ -318,11 +318,10 @@
 
   // Set the final value of the stack pointer...
   FFI->setStackSize(Offset+TFI.getOffsetOfLocalArea());
-  // If we have a new stack alignment, set the preferred stack alignment so that
-  // the targets can do the appropriate thing to properly align the stack above
-  // the default alignment.
-  if (MaxAlign > StackAlignment)
-    FFI->setMaxAlignment(MaxAlign);
+
+  // Remember the required stack alignment in case targets need it to perform
+  // dynamic stack alignment.
+  FFI->setMaxAlignment(MaxAlign);
 }
 
 






More information about the llvm-commits mailing list