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

Evan Cheng evan.cheng at apple.com
Thu Apr 24 11:42:47 PDT 2008


Author: evancheng
Date: Thu Apr 24 13:42:47 2008
New Revision: 50222

URL: http://llvm.org/viewvc/llvm-project?rev=50222&view=rev
Log:
Adjust inline cost computation to be less aggressive.

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=50222&r1=50221&r2=50222&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Utils/InlineCost.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/InlineCost.cpp Thu Apr 24 13:42:47 2008
@@ -173,7 +173,7 @@
   // make it almost guaranteed to be inlined.
   //
   if (Callee->hasInternalLinkage() && Callee->hasOneUse())
-    InlineCost -= 30000;
+    InlineCost -= 15000;
   
   // If this function uses the coldcc calling convention, prefer not to inline
   // it.
@@ -236,7 +236,7 @@
   
   // Don't inline into something too big, which would make it bigger.
   //
-  InlineCost += Caller->size()/20;
+  InlineCost += Caller->size()/15;
   
   // Look at the size of the callee. Each instruction counts as 5.
   InlineCost += CalleeFI.NumInsts*5;





More information about the llvm-commits mailing list