aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/ARM/ARMSubtarget.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2015-10-28 22:56:36 +0000
committerTim Northover <tnorthover@apple.com>2015-10-28 22:56:36 +0000
commitf8e47e4868270ee1bea61a5b64f3df5153262a08 (patch)
treeadb4e7c6c66481f3cd0c2d4ee0d01aec0fef532a /llvm/lib/Target/ARM/ARMSubtarget.cpp
parent2253d1c0525d2a30c0a9e6e26237dabc6237b9b4 (diff)
downloadllvm-f8e47e4868270ee1bea61a5b64f3df5153262a08.zip
llvm-f8e47e4868270ee1bea61a5b64f3df5153262a08.tar.gz
llvm-f8e47e4868270ee1bea61a5b64f3df5153262a08.tar.bz2
ARM: add support for WatchOS's compact unwind information.
llvm-svn: 251573
Diffstat (limited to 'llvm/lib/Target/ARM/ARMSubtarget.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMSubtarget.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMSubtarget.cpp b/llvm/lib/Target/ARM/ARMSubtarget.cpp
index 84d3ebc..50eb378 100644
--- a/llvm/lib/Target/ARM/ARMSubtarget.cpp
+++ b/llvm/lib/Target/ARM/ARMSubtarget.cpp
@@ -151,6 +151,8 @@ void ARMSubtarget::initializeEnvironment() {
UseNaClTrap = false;
GenLongCalls = false;
UnsafeFPMath = false;
+ UseSjLjEH = (isTargetDarwin() &&
+ TargetTriple.getSubArch() != Triple::ARMSubArch_v7k);
}
void ARMSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
@@ -324,7 +326,10 @@ bool ARMSubtarget::enableAtomicExpand() const {
}
bool ARMSubtarget::useStride4VFPs(const MachineFunction &MF) const {
- return isSwift() && !MF.getFunction()->optForMinSize();
+ // For general targets, the prologue can grow when VFPs are allocated with
+ // stride 4 (more vpush instructions). But WatchOS uses a compact unwind
+ // format which it's more important to get right.
+ return isTargetWatchOS() || (isSwift() && !MF.getFunction()->optForMinSize());
}
bool ARMSubtarget::useMovt(const MachineFunction &MF) const {