[llvm-commits] [llvm] r58742 - /llvm/trunk/lib/Transforms/Utils/InlineCost.cpp

Devang Patel dpatel at apple.com
Tue Nov 4 17:37:06 PST 2008


Author: dpatel
Date: Tue Nov  4 19:37:05 2008
New Revision: 58742

URL: http://llvm.org/viewvc/llvm-project?rev=58742&view=rev
Log:
Check Attribute::NoInline.

Modified:
    llvm/trunk/lib/Transforms/Utils/InlineCost.cpp

Modified: llvm/trunk/lib/Transforms/Utils/InlineCost.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/InlineCost.cpp?rev=58742&r1=58741&r2=58742&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Utils/InlineCost.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/InlineCost.cpp Tue Nov  4 19:37:05 2008
@@ -182,11 +182,9 @@
       // 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





More information about the llvm-commits mailing list