summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMBaseRegisterInfo.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2011-10-20 00:07:12 +0000
committerChad Rosier <mcrosier@apple.com>2011-10-20 00:07:12 +0000
commit6690bca623d1f6405b95db5b1760f7ba8436e3fb (patch)
tree6c50cf29415edd4ae071a6130239499fd79b0dee /lib/Target/ARM/ARMBaseRegisterInfo.cpp
parent9be72d43948b3bad4a0ac8ea01e24fd36e6db615 (diff)
downloadllvm-6690bca623d1f6405b95db5b1760f7ba8436e3fb.tar.gz
llvm-6690bca623d1f6405b95db5b1760f7ba8436e3fb.tar.bz2
llvm-6690bca623d1f6405b95db5b1760f7ba8436e3fb.tar.xz
Revert 142337. Thumb1 still doesn't support dynamic stack realignment. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142557 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMBaseRegisterInfo.cpp')
-rw-r--r--lib/Target/ARM/ARMBaseRegisterInfo.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Target/ARM/ARMBaseRegisterInfo.cpp b/lib/Target/ARM/ARMBaseRegisterInfo.cpp
index 48e3c52460..7c42342229 100644
--- a/lib/Target/ARM/ARMBaseRegisterInfo.cpp
+++ b/lib/Target/ARM/ARMBaseRegisterInfo.cpp
@@ -626,10 +626,13 @@ 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. There are VLAs in the function and the base pointer is disabled.
- return (RealignStack && (!MFI->hasVarSizedObjects() || EnableBasePointer));
+ // 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));
}
bool ARMBaseRegisterInfo::