diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2010-01-26 23:13:04 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2010-01-26 23:13:04 +0000 |
| commit | c35b5a123bd1395fc5af4ecb1359e9042a45ff21 (patch) | |
| tree | d5f98045d660c9059afb36bcf33c74e4165ff2bc /llvm/lib/CodeGen/SelectionDAG | |
| parent | 1b7b9e852c8fdedd18891d5d814b5e3e9db35ac1 (diff) | |
| download | bcm5719-llvm-c35b5a123bd1395fc5af4ecb1359e9042a45ff21.tar.gz bcm5719-llvm-c35b5a123bd1395fc5af4ecb1359e9042a45ff21.zip | |
Allow some automatic tailcall optimization without changing ABI.
llvm-svn: 94611
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index dddf3851637..55dc460cb40 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -5122,9 +5122,7 @@ void SelectionDAGBuilder::visitCall(CallInst &I) { // Check if we can potentially perform a tail call. More detailed checking is // be done within LowerCallTo, after more information about the call is known. - bool isTailCall = PerformTailCallOpt && I.isTailCall(); - - LowerCallTo(&I, Callee, isTailCall); + LowerCallTo(&I, Callee, I.isTailCall()); } /// getCopyFromRegs - Emit a series of CopyFromReg nodes that copies from @@ -6118,9 +6116,6 @@ TargetLowering::LowerCallTo(SDValue Chain, const Type *RetTy, SDValue Callee, ArgListTy &Args, SelectionDAG &DAG, DebugLoc dl, unsigned Order) { - assert((!isTailCall || PerformTailCallOpt) && - "isTailCall set when tail-call optimizations are disabled!"); - // Handle all of the outgoing arguments. SmallVector<ISD::OutputArg, 32> Outs; for (unsigned i = 0, e = Args.size(); i != e; ++i) { |

