summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-10-17 18:43:40 +0000
committerBill Wendling <isanbard@gmail.com>2011-10-17 18:43:40 +0000
commit63a4ea185965b3278fb07b7b865910eb18ee83ad (patch)
treed4469cba160af830b117b8b8075ed7197f613e03 /llvm/lib/Transforms
parent975bfc9b45ef7384a4d744fb5f7fdf61325001bf (diff)
downloadbcm5719-llvm-63a4ea185965b3278fb07b7b865910eb18ee83ad.tar.gz
bcm5719-llvm-63a4ea185965b3278fb07b7b865910eb18ee83ad.zip
Correct over-zealous removal of hack.
Some code want to check that *any* call within a function has the 'returns twice' attribute, not just that the current function has one. llvm-svn: 142221
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp b/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
index 1022485a948..e21eb9dca27 100644
--- a/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
@@ -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.hasFnAttr(Attribute::ReturnsTwice))
+ if (!FunctionContainsEscapingAllocas && !F.callsFunctionThatReturnsTwice())
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)) {
OpenPOWER on IntegriCloud