summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/InlineCost.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-11-05 01:37:05 +0000
committerDevang Patel <dpatel@apple.com>2008-11-05 01:37:05 +0000
commit7a848b0ee31db7025da0325ad86b7dabd58b0dfc (patch)
treef9341c58d7aebeedbd1fe67655f38c98c17335f1 /llvm/lib/Transforms/Utils/InlineCost.cpp
parentdb045a304894b643d679bb29dca148d8d0a52d83 (diff)
downloadbcm5719-llvm-7a848b0ee31db7025da0325ad86b7dabd58b0dfc.tar.gz
bcm5719-llvm-7a848b0ee31db7025da0325ad86b7dabd58b0dfc.zip
Check Attribute::NoInline.
llvm-svn: 58742
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineCost.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/InlineCost.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineCost.cpp b/llvm/lib/Transforms/Utils/InlineCost.cpp
index b85a45590cb..29d4f797325 100644
--- a/llvm/lib/Transforms/Utils/InlineCost.cpp
+++ b/llvm/lib/Transforms/Utils/InlineCost.cpp
@@ -182,11 +182,9 @@ InlineCost InlineCostAnalyzer::getInlineCost(CallSite CS,
// FIXME: We allow link-once linkage since in practice all versions of
// the function have the same body (C++ ODR) - but the LLVM definition
// of LinkOnceLinkage doesn't require this.
- (Callee->mayBeOverridden() && !Callee->hasLinkOnceLinkage()
- ) ||
-
+ (Callee->mayBeOverridden() && !Callee->hasLinkOnceLinkage()) ||
// Don't inline functions marked noinline.
- NeverInline.count(Callee))
+ Callee->hasFnAttr(Attribute::NoInline) || NeverInline.count(Callee))
return llvm::InlineCost::getNever();
// InlineCost - This value measures how good of an inline candidate this call
OpenPOWER on IntegriCloud