diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2014-08-13 23:23:58 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2014-08-13 23:23:58 +0000 |
commit | b74db09c97ff4999352db87e5a2141c2dfb0740a (patch) | |
tree | be5829eb1531c9b682d10e94c62bc663a2e59811 /llvm/lib/Target/AArch64/AArch64FastISel.cpp | |
parent | 45a09319bf5c01281a7d45ef02b1bfc5573079b5 (diff) | |
download | bcm5719-llvm-b74db09c97ff4999352db87e5a2141c2dfb0740a.tar.gz bcm5719-llvm-b74db09c97ff4999352db87e5a2141c2dfb0740a.zip |
[AArch64, fast-isel] Fall back to SelectionDAG to select tail calls.
Certain functions such as objc_autoreleaseReturnValue have to be called as
tail-calls even at -O0. Since normal fast-isel doesn't emit calls as tail calls,
we have to fall back to SelectionDAG to select calls that are marked as tail.
<rdar://problem/17991614>
llvm-svn: 215600
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64FastISel.cpp')
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64FastISel.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64FastISel.cpp b/llvm/lib/Target/AArch64/AArch64FastISel.cpp index a59ee85423b..5459c1ba4f7 100644 --- a/llvm/lib/Target/AArch64/AArch64FastISel.cpp +++ b/llvm/lib/Target/AArch64/AArch64FastISel.cpp @@ -1687,10 +1687,15 @@ bool AArch64FastISel::FinishCall(CallLoweringInfo &CLI, MVT RetVT, bool AArch64FastISel::FastLowerCall(CallLoweringInfo &CLI) { CallingConv::ID CC = CLI.CallConv; + bool IsTailCall = CLI.IsTailCall; bool IsVarArg = CLI.IsVarArg; const Value *Callee = CLI.Callee; const char *SymName = CLI.SymName; + // Allow SelectionDAG isel to handle tail calls. + if (IsTailCall) + return false; + CodeModel::Model CM = TM.getCodeModel(); // Only support the small and large code model. if (CM != CodeModel::Small && CM != CodeModel::Large) |