summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitadd38c12b84a57d282aa624ba764a9a2b3f94c44 (patch)
tree5323e1790b6d4a68c5ce2c9b55867d3add020561 /llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
parent88b4fa21c84af63dcc80ed622062a0e22c2af538 (diff)
downloadbcm5719-llvm-add38c12b84a57d282aa624ba764a9a2b3f94c44.tar.gz
bcm5719-llvm-add38c12b84a57d282aa624ba764a9a2b3f94c44.zip
Revert 142337. Thumb1 still doesn't support dynamic stack realignment. :(
llvm-svn: 142557
Diffstat (limited to 'llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp b/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
index 48e3c524606..7c42342229a 100644
--- a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
+++ b/llvm/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::
OpenPOWER on IntegriCloud