summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorVivek Pandya <vivekvpandya@gmail.com>2019-06-10 04:16:04 +0000
committerVivek Pandya <vivekvpandya@gmail.com>2019-06-10 04:16:04 +0000
commit11cb15f8ed377940b4a705b0bef9faf20d55cc4b (patch)
treef4b99a63e5e8a2bc97e2991dad234e0886d5c06f /llvm/lib/Transforms
parent3f3bae33a273f1dfe07f9b65cb317c6eb610182a (diff)
downloadbcm5719-llvm-11cb15f8ed377940b4a705b0bef9faf20d55cc4b.tar.gz
bcm5719-llvm-11cb15f8ed377940b4a705b0bef9faf20d55cc4b.zip
Do not derive no-recurse attribute if function does not have exact definition.
This is fix for https://bugs.llvm.org/show_bug.cgi?id=41336 Reviewers: jdoerfert Reviewed by: jdoerfert Differential Revision: https://reviews.llvm.org/D63045 llvm-svn: 362918
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/FunctionAttrs.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
index 28982d66d7d..9e95e796da6 100644
--- a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
@@ -1300,7 +1300,7 @@ static bool addNoRecurseAttrs(const SCCNodeSet &SCCNodes) {
return false;
Function *F = *SCCNodes.begin();
- if (!F || F->isDeclaration() || F->doesNotRecurse())
+ if (!F || !F->hasExactDefinition() || F->doesNotRecurse())
return false;
// If all of the calls in F are identifiable and are to norecurse functions, F
OpenPOWER on IntegriCloud