summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMBaseRegisterInfo.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2011-10-01 02:03:18 +0000
committerChad Rosier <mcrosier@apple.com>2011-10-01 02:03:18 +0000
commit52490411259ccc34b8c59f3532e78442a46fffd7 (patch)
tree5f5869382a763dcf72f2d4e10a5d21d14f2159b5 /lib/Target/ARM/ARMBaseRegisterInfo.cpp
parentb2ab2fa524f3f90376639037bd81924483cca0af (diff)
downloadllvm-52490411259ccc34b8c59f3532e78442a46fffd7.tar.gz
llvm-52490411259ccc34b8c59f3532e78442a46fffd7.tar.bz2
llvm-52490411259ccc34b8c59f3532e78442a46fffd7.tar.xz
Attempt to fix dynamic stack realignment for thumb1 functions. It is in fact
useful if an optimization assumes the stack has been realigned. Credit to Eli for his assistance. rdar://10043857 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140924 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMBaseRegisterInfo.cpp')
-rw-r--r--lib/Target/ARM/ARMBaseRegisterInfo.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Target/ARM/ARMBaseRegisterInfo.cpp b/lib/Target/ARM/ARMBaseRegisterInfo.cpp
index 7c42342229..48e3c52460 100644
--- a/lib/Target/ARM/ARMBaseRegisterInfo.cpp
+++ b/lib/Target/ARM/ARMBaseRegisterInfo.cpp
@@ -626,13 +626,10 @@ bool ARMBaseRegisterInfo::hasBasePointer(const MachineFunction &MF) const {
bool ARMBaseRegisterInfo::canRealignStack(const MachineFunction &MF) const {
const MachineFrameInfo *MFI = MF.getFrameInfo();
- const ARMFunctionInfo *AFI = MF.getInfo<ARMFunctionInfo>();
// We can't realign the stack if:
// 1. Dynamic stack realignment is explicitly disabled,
- // 2. This is a Thumb1 function (it's not useful, so we don't bother), or
- // 3. There are VLAs in the function and the base pointer is disabled.
- return (RealignStack && !AFI->isThumb1OnlyFunction() &&
- (!MFI->hasVarSizedObjects() || EnableBasePointer));
+ // 2. There are VLAs in the function and the base pointer is disabled.
+ return (RealignStack && (!MFI->hasVarSizedObjects() || EnableBasePointer));
}
bool ARMBaseRegisterInfo::