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 | df42cf39abb248d09b1629783638fb960b7cc68c (patch) | |
| tree | 4bb3d3e88905329fece1b76fe5d76213f206252e /llvm/lib/Target/ARM | |
| parent | a7b1c47c1abb7e97173cbc4027687229121c2724 (diff) | |
| download | bcm5719-llvm-df42cf39abb248d09b1629783638fb960b7cc68c.tar.gz bcm5719-llvm-df42cf39abb248d09b1629783638fb960b7cc68c.zip | |
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
llvm-svn: 169796
Diffstat (limited to 'llvm/lib/Target/ARM')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMFastISel.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMFastISel.cpp b/llvm/lib/Target/ARM/ARMFastISel.cpp index 21bb1476440..c3a5e6472ef 100644 --- a/llvm/lib/Target/ARM/ARMFastISel.cpp +++ b/llvm/lib/Target/ARM/ARMFastISel.cpp @@ -2284,6 +2284,9 @@ bool ARMFastISel::SelectCall(const Instruction *I, // Can't handle inline asm. if (isa<InlineAsm>(Callee)) return false; + // Allow SelectionDAG isel to handle tail calls. + if (CI->isTailCall()) return false; + // Check the calling convention. ImmutableCallSite CS(CI); CallingConv::ID CC = CS.getCallingConv(); |

