diff options
| author | Devang Patel <dpatel@apple.com> | 2008-11-05 01:37:05 +0000 | 
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2008-11-05 01:37:05 +0000 | 
| commit | 7a848b0ee31db7025da0325ad86b7dabd58b0dfc (patch) | |
| tree | f9341c58d7aebeedbd1fe67655f38c98c17335f1 | |
| parent | db045a304894b643d679bb29dca148d8d0a52d83 (diff) | |
| download | bcm5719-llvm-7a848b0ee31db7025da0325ad86b7dabd58b0dfc.tar.gz bcm5719-llvm-7a848b0ee31db7025da0325ad86b7dabd58b0dfc.zip  | |
Check Attribute::NoInline.
llvm-svn: 58742
| -rw-r--r-- | llvm/lib/Transforms/Utils/InlineCost.cpp | 6 | 
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  | 

