diff options
author | Chris Lattner <sabre@nondot.org> | 2005-11-06 17:43:20 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-11-06 17:43:20 +0000 |
commit | 629ba44e500060f8be10e389364ac33aa338066a (patch) | |
tree | 43b006f9a97573cf235f9b2a8d9d643bd01e4b1f | |
parent | d0828039486c546a98e1523aeff54b2b24c21316 (diff) | |
download | bcm5719-llvm-629ba44e500060f8be10e389364ac33aa338066a.tar.gz bcm5719-llvm-629ba44e500060f8be10e389364ac33aa338066a.zip |
Always compute max align.
llvm-svn: 24227
-rw-r--r-- | llvm/lib/CodeGen/PrologEpilogInserter.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp index 95932207a58..b3bf88d6893 100644 --- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp +++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp @@ -258,7 +258,7 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) { 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 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) { // 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); } |