ARM: add support for WatchOS's compact unwind information.
llvm-svn: 251573
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 @@
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::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 {