Now that we have the ReturnsTwice function attribute, this method is

obsolete. Check the attribute instead.
<rdar://problem/8031714>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142212 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling
2011-10-17 18:22:52 +00:00
parent f1fddcd9e0
commit 728662f9e8
5 changed files with 7 additions and 52 deletions

View File

@ -213,7 +213,7 @@ bool TailCallElim::runOnFunction(Function &F) {
// Finally, if this function contains no non-escaping allocas, or calls
// setjmp, mark all calls in the function as eligible for tail calls
//(there is no stack memory for them to access).
if (!FunctionContainsEscapingAllocas && !F.callsFunctionThatReturnsTwice())
if (!FunctionContainsEscapingAllocas && !F.hasFnAttr(Attribute::ReturnsTwice))
for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB)
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I)
if (CallInst *CI = dyn_cast<CallInst>(I)) {