# HG changeset patch # User MitsukiMiyagi # Date 1457356055 -32400 # Node ID 4b203247047d489557c92c6608d00a8f2f98df49 # Parent 3e4d254d74d91409bee04a1bfe57240017b1d3d5 ignore TailCall failure in SelectionDAGBuilder (not Unreachable instruction) diff -r 3e4d254d74d9 -r 4b203247047d lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Tue Feb 02 19:38:53 2016 +0900 +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Mon Mar 07 22:07:35 2016 +0900 @@ -5410,8 +5410,14 @@ // Check if target-independent constraints permit a tail call here. // Target-dependent constraints are checked within TLI->LowerCallTo. - if (isTailCall && !isInTailCallPosition(CS, DAG.getTarget())) + if (isTailCall && !isInTailCallPosition(CS, DAG.getTarget())) { +#ifndef noCbC + errs() << CS.getCaller()->getName() + " : Tail call elimination was failed on goto "; + errs() << "warning: not unreachable instruction in a tail call.\n "; +#else isTailCall = false; +#endif + } TargetLowering::CallLoweringInfo CLI(DAG); CLI.setDebugLoc(getCurSDLoc()).setChain(getRoot())