[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
Date: Tue Mar 9 16:17:06 2010
New Revision: 98088
Permit inlining into huge functions. This heuristic is ancient, and inlining
can sometimes help reduce function size.
--- 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