diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-12-11 00:18:02 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-12-11 00:18:02 +0000 |
commit | 425e951734c3a0615e22ec94ffa51cc16ce6e483 (patch) | |
tree | 498b09ecb92c4701f5626d07a50ac1c0d5401830 /test/CodeGen/X86/tailcall-fastisel.ll | |
parent | 0e3e9b79f6e471b46438251249f18121408e5189 (diff) | |
download | llvm-425e951734c3a0615e22ec94ffa51cc16ce6e483.tar.gz llvm-425e951734c3a0615e22ec94ffa51cc16ce6e483.tar.bz2 llvm-425e951734c3a0615e22ec94ffa51cc16ce6e483.tar.xz |
Fall back to the selection dag isel to select tail calls.
This shouldn't affect codegen for -O0 compiles as tail call markers are not
emitted in unoptimized compiles. Testing with the external/internal nightly
test suite reveals no change in compile time performance. Testing with -O1,
-O2 and -O3 with fast-isel enabled did not cause any compile-time or
execution-time failures. All tests were performed on my x86 machine.
I'll monitor our arm testers to ensure no regressions occur there.
In an upcoming clang patch I will be marking the objc_autoreleaseReturnValue
and objc_retainAutoreleaseReturnValue as tail calls unconditionally. While
it's theoretically true that this is just an optimization, it's an
optimization that we very much want to happen even at -O0, or else ARC
applications become substantially harder to debug.
Part of rdar://12553082
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169796 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/tailcall-fastisel.ll')
-rw-r--r-- | test/CodeGen/X86/tailcall-fastisel.ll | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/CodeGen/X86/tailcall-fastisel.ll b/test/CodeGen/X86/tailcall-fastisel.ll index 7f92af4dca..9962d71988 100644 --- a/test/CodeGen/X86/tailcall-fastisel.ll +++ b/test/CodeGen/X86/tailcall-fastisel.ll @@ -1,12 +1,11 @@ -; RUN: llc < %s -march=x86-64 -tailcallopt -fast-isel | not grep TAILCALL - -; Fast-isel shouldn't attempt to cope with tail calls. +; RUN: llc < %s -march=x86-64 -tailcallopt -fast-isel -fast-isel-abort | FileCheck %s %0 = type { i64, i32, i8* } define fastcc i8* @"visit_array_aux<`Reference>"(%0 %arg, i32 %arg1) nounwind { fail: ; preds = %entry %tmp20 = tail call fastcc i8* @"visit_array_aux<`Reference>"(%0 %arg, i32 undef) ; <i8*> [#uses=1] +; CHECK: jmp "_visit_array_aux<`Reference>" ## TAILCALL ret i8* %tmp20 } |