summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMSubtarget.cpp
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-03-11 15:09:44 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-03-11 15:09:44 +0000
commitcde1f2eae22be05c4a68d0e8c77c58f1883d332b (patch)
treecde3b03b3039ea0cec82a9ee380c38831dcc3d53 /lib/Target/ARM/ARMSubtarget.cpp
parent0638609d66d05b5aaa18e9dafa844765d9ce88e3 (diff)
downloadllvm-cde1f2eae22be05c4a68d0e8c77c58f1883d332b.tar.gz
llvm-cde1f2eae22be05c4a68d0e8c77c58f1883d332b.tar.bz2
llvm-cde1f2eae22be05c4a68d0e8c77c58f1883d332b.tar.xz
ARM: enable tail call optimisation on Thumb 2
Tail call optimisation was previously disabled on all targets other than iOS5.0+. This enables the tail call optimisation on all Thumb 2 capable platforms. The test adjustments are to remove the IR hint "tail" to function invocation. The tests were designed assuming that tail call optimisations would not kick in which no longer holds true. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203575 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMSubtarget.cpp')
-rw-r--r--lib/Target/ARM/ARMSubtarget.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMSubtarget.cpp b/lib/Target/ARM/ARMSubtarget.cpp
index d510e7ebf1..69b496f386 100644
--- a/lib/Target/ARM/ARMSubtarget.cpp
+++ b/lib/Target/ARM/ARMSubtarget.cpp
@@ -219,8 +219,10 @@ void ARMSubtarget::resetSubtargetFeatures(StringRef CPU, StringRef FS) {
if (isTargetMachO()) {
IsR9Reserved = ReserveR9 | !HasV6Ops;
SupportsTailCall = !isTargetIOS() || !getTargetTriple().isOSVersionLT(5, 0);
- } else
+ } else {
IsR9Reserved = ReserveR9;
+ SupportsTailCall = !isThumb1Only();
+ }
if (!isThumb() || hasThumb2())
PostRAScheduler = true;