diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-09-03 18:28:19 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-09-03 18:28:19 +0000 |
commit | fc633002339439339e94f83eca9a012c6fc51e50 (patch) | |
tree | 0bfce752a3fadf5150b35844e60df52076cfeda4 /lib/Target | |
parent | 260fbf2b57859d513e78acd68a8e122581198e68 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112986 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/ARM/ARMBaseRegisterInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMBaseRegisterInfo.cpp b/lib/Target/ARM/ARMBaseRegisterInfo.cpp index 99c2e997e7..8c1b913a20 100644 --- a/lib/Target/ARM/ARMBaseRegisterInfo.cpp +++ b/lib/Target/ARM/ARMBaseRegisterInfo.cpp @@ -639,7 +639,7 @@ needsStackRealignment(const MachineFunction &MF) const { 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) || F->hasFnAttr(Attribute::StackAlignment)); // FIXME: Currently we don't support stack realignment for functions with |