summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
commitec1ec1b41689151db24a81a98554b995df1839ab (patch)
tree9481ff6a39278d8f7d5fd72299a8d0d1b4efbdf9 /llvm/lib
parent3f5dcc97e020a480e9252bbd120843c3777b1ffb (diff)
downloadbcm5719-llvm-ec1ec1b41689151db24a81a98554b995df1839ab.tar.gz
bcm5719-llvm-ec1ec1b41689151db24a81a98554b995df1839ab.zip
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. llvm-svn: 203575
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/ARM/ARMSubtarget.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMSubtarget.cpp b/llvm/lib/Target/ARM/ARMSubtarget.cpp
index d510e7ebf10..69b496f386e 100644
--- a/llvm/lib/Target/ARM/ARMSubtarget.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud