aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
diff options
context:
space:
mode:
authorEugene Leviant <eleviant@accesssoftek.com>2017-12-25 13:57:24 +0000
committerEugene Leviant <eleviant@accesssoftek.com>2017-12-25 13:57:24 +0000
commit193e701d86c1b7302989efb366042ca6e802b00f (patch)
treeb7bf9f7af93f544454642cb05727ac4b691a80d5 /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
parent2b2a02ea1316163a75748e3db2a33e13280e655a (diff)
downloadllvm-193e701d86c1b7302989efb366042ca6e802b00f.zip
llvm-193e701d86c1b7302989efb366042ca6e802b00f.tar.gz
llvm-193e701d86c1b7302989efb366042ca6e802b00f.tar.bz2
[ThinLTO] Don't import functions with noinline attribute
Differential revision: https://reviews.llvm.org/D41489 llvm-svn: 321443
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/ModuleSummaryAnalysis.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
index 10badd8..efa5bd5 100644
--- a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
+++ b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
@@ -306,7 +306,9 @@ computeFunctionSummary(ModuleSummaryIndex &Index, const Module &M,
NonRenamableLocal || HasInlineAsmMaybeReferencingInternal ||
// Inliner doesn't handle variadic functions.
// FIXME: refactor this to use the same code that inliner is using.
- F.isVarArg();
+ F.isVarArg() ||
+ // Don't try to import functions with noinline attribute.
+ F.getAttributes().hasFnAttribute(Attribute::NoInline);
GlobalValueSummary::GVFlags Flags(F.getLinkage(), NotEligibleForImport,
/* Live = */ false, F.isDSOLocal());
FunctionSummary::FFlags FunFlags{