diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-02-03 03:55:59 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-02-03 03:55:59 +0000 |
commit | febc81680c80a53f15f85b1812cba07fc179b9fd (patch) | |
tree | fd7bb78079527e669515e681dcf1e6122a7afd7f /lib/Transforms/Scalar | |
parent | 2e235a826d2f65a064b2a39b27c775d0adf8b7c3 (diff) | |
download | external_llvm-febc81680c80a53f15f85b1812cba07fc179b9fd.zip external_llvm-febc81680c80a53f15f85b1812cba07fc179b9fd.tar.gz external_llvm-febc81680c80a53f15f85b1812cba07fc179b9fd.tar.bz2 |
Revert 94937 and move the noreturn check to codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95198 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar')
-rw-r--r-- | lib/Transforms/Scalar/TailRecursionElimination.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Transforms/Scalar/TailRecursionElimination.cpp b/lib/Transforms/Scalar/TailRecursionElimination.cpp index 913dd73..162d902 100644 --- a/lib/Transforms/Scalar/TailRecursionElimination.cpp +++ b/lib/Transforms/Scalar/TailRecursionElimination.cpp @@ -184,11 +184,10 @@ bool TailCallElim::runOnFunction(Function &F) { if (!FunctionContainsEscapingAllocas) 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)) - if (!CI->doesNotReturn()) { - CI->setTailCall(); - MadeChange = true; - } + if (CallInst *CI = dyn_cast<CallInst>(I)) { + CI->setTailCall(); + MadeChange = true; + } return MadeChange; } |