summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMSubtarget.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2015-08-03 17:20:10 +0000
committerTim Northover <tnorthover@apple.com>2015-08-03 17:20:10 +0000
commit910dde7ab2f725732222387af0d93f898afec42b (patch)
tree6231d430981c1c2cf284ffde57078179ba2c3e71 /llvm/lib/Target/ARM/ARMSubtarget.cpp
parent4fb46cb818f43805205cf05d7064cb443e04f69c (diff)
downloadbcm5719-llvm-910dde7ab2f725732222387af0d93f898afec42b.tar.gz
bcm5719-llvm-910dde7ab2f725732222387af0d93f898afec42b.zip
ARM: prefer allocating VFP regs at stride 4 on Darwin.
This is necessary for WatchOS support, where the compact unwind format assumes this kind of layout. For now we only want this on Swift-like CPUs though, where it's been the Xcode behaviour for ages. Also, since it can expand the prologue we don't want it at -Oz. llvm-svn: 243884
Diffstat (limited to 'llvm/lib/Target/ARM/ARMSubtarget.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMSubtarget.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMSubtarget.cpp b/llvm/lib/Target/ARM/ARMSubtarget.cpp
index 4c6e69654d5..b91e9ae650c 100644
--- a/llvm/lib/Target/ARM/ARMSubtarget.cpp
+++ b/llvm/lib/Target/ARM/ARMSubtarget.cpp
@@ -167,6 +167,7 @@ void ARMSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
ArchFS = FS;
}
ParseSubtargetFeatures(CPUString, ArchFS);
+ printf("A-class: %d\n", static_cast<bool>(getFeatureBits()[ARM::ProcSwift]));
// FIXME: This used enable V6T2 support implicitly for Thumb2 mode.
// Assert this for now to make the change obvious.
@@ -285,6 +286,10 @@ bool ARMSubtarget::enableAtomicExpand() const {
return hasAnyDataBarrier() && !isThumb1Only();
}
+bool ARMSubtarget::useStride4VFPs(const MachineFunction &MF) const {
+ return isSwift() && !MF.getFunction()->hasFnAttribute(Attribute::MinSize);
+}
+
bool ARMSubtarget::useMovt(const MachineFunction &MF) const {
// NOTE Windows on ARM needs to use mov.w/mov.t pairs to materialise 32-bit
// immediates as it is inherently position independent, and may be out of
OpenPOWER on IntegriCloud