[llvm-commits] [llvm] r98088 - /llvm/trunk/lib/Analysis/InlineCost.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue Mar 9 14:17:07 PST 2010


Author: stoklund
Date: Tue Mar  9 16:17:06 2010
New Revision: 98088

URL: http://llvm.org/viewvc/llvm-project?rev=98088&view=rev
Log:
Permit inlining into huge functions. This heuristic is ancient, and inlining
can sometimes help reduce function size.

Modified:
    llvm/trunk/lib/Analysis/InlineCost.cpp

Modified: llvm/trunk/lib/Analysis/InlineCost.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InlineCost.cpp?rev=98088&r1=98087&r2=98088&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InlineCost.cpp (original)
+++ llvm/trunk/lib/Analysis/InlineCost.cpp Tue Mar  9 16:17:06 2010
@@ -352,11 +352,6 @@
   // Calls usually take a long time, so they make the inlining gain smaller.
   InlineCost += CalleeFI.Metrics.NumCalls * InlineConstants::CallPenalty;
 
-  // Don't inline into something too big, which would make it bigger.
-  // "size" here is the number of basic blocks, not instructions.
-  //
-  InlineCost += Caller->size()/15;
-  
   // Look at the size of the callee. Each instruction counts as 5.
   InlineCost += CalleeFI.Metrics.NumInsts*InlineConstants::InstrCost;
 





More information about the llvm-commits mailing list