diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-12-20 22:15:04 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-12-20 22:15:04 +0000 |
commit | 52346e964ff1108729c2b8990b859c10f09a1822 (patch) | |
tree | 25180d9dd8717b1aef6cb9c889d49a2f5616434f /lib/Target/ARM/ARMBaseRegisterInfo.cpp | |
parent | 05c585319b8620178d3032f74704c5be360ab7e7 (diff) | |
download | llvm-52346e964ff1108729c2b8990b859c10f09a1822.tar.gz llvm-52346e964ff1108729c2b8990b859c10f09a1822.tar.bz2 llvm-52346e964ff1108729c2b8990b859c10f09a1822.tar.xz |
Heed spill slot alignment on ARM.
Use the spill slot alignment as well as the local variable alignment to
determine when the stack needs to be realigned. This works now that the
ARM target can always realign the stack by using a base pointer.
Still respect the ARMBaseRegisterInfo::canRealignStack() function
vetoing a realigned stack. Don't use aligned spill code in that case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146997 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMBaseRegisterInfo.cpp')
-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 9c91bcc307..44efb6a761 100644 --- a/lib/Target/ARM/ARMBaseRegisterInfo.cpp +++ b/lib/Target/ARM/ARMBaseRegisterInfo.cpp @@ -542,7 +542,7 @@ needsStackRealignment(const MachineFunction &MF) const { const MachineFrameInfo *MFI = MF.getFrameInfo(); const Function *F = MF.getFunction(); unsigned StackAlign = MF.getTarget().getFrameLowering()->getStackAlignment(); - bool requiresRealignment = ((MFI->getLocalFrameMaxAlign() > StackAlign) || + bool requiresRealignment = ((MFI->getMaxAlignment() > StackAlign) || F->hasFnAttr(Attribute::StackAlignment)); return requiresRealignment && canRealignStack(MF); |