[llvm-commits] [llvm] r112986 - /llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp

Jim Grosbach grosbach at apple.com
Fri Sep 3 11:28:19 PDT 2010

Author: grosbach
Date: Fri Sep  3 13:28:19 2010
New Revision: 112986

URL: http://llvm.org/viewvc/llvm-project?rev=112986&view=rev
Check the local frame alignment for determining whether dynamic stack
alignment should be performed. Otherwise dynamic realignment may trigger
when the register allocator has already used the frame pointer as a general
purpose register. That is, we need to make sure that the list of reserved
registers doesn't change after register allocation.


Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp?rev=112986&r1=112985&r2=112986&view=diff
--- llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Fri Sep  3 13:28:19 2010
@@ -639,7 +639,7 @@
   const Function *F = MF.getFunction();
   const ARMFunctionInfo *AFI = MF.getInfo<ARMFunctionInfo>();
   unsigned StackAlign = MF.getTarget().getFrameInfo()->getStackAlignment();
-  bool requiresRealignment = ((MFI->getMaxAlignment() > StackAlign) ||
+  bool requiresRealignment = ((MFI->getLocalFrameMaxAlign() > StackAlign) ||
   // FIXME: Currently we don't support stack realignment for functions with

More information about the llvm-commits mailing list