Mercurial > hg > Members > tobaru > cbc > CbC_llvm
changeset 112:4b203247047d
ignore TailCall failure in SelectionDAGBuilder (not Unreachable instruction)
author | MitsukiMiyagi |
---|---|
date | Mon, 07 Mar 2016 22:07:35 +0900 |
parents | 3e4d254d74d9 |
children | b8d969d74b93 |
files | lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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())