From: Eli Friedman Date: Tue, 24 May 2011 20:22:24 +0000 (+0000) Subject: Change condition for determining whether a function is small for inlining metrics... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b1763993398f1c198ff389e9b0a6db1e65b49260;p=oota-llvm.git Change condition for determining whether a function is small for inlining metrics so that very long functions with few basic blocks are not re-analyzed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131994 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/InlineCost.cpp b/lib/Analysis/InlineCost.cpp index 9ea34959b99..efde5984c11 100644 --- a/lib/Analysis/InlineCost.cpp +++ b/lib/Analysis/InlineCost.cpp @@ -593,7 +593,7 @@ InlineCostAnalyzer::growCachedCostInfo(Function *Caller, Function *Callee) { CodeMetrics &CallerMetrics = CachedFunctionInfo[Caller].Metrics; // For small functions we prefer to recalculate the cost for better accuracy. - if (CallerMetrics.NumBlocks < 10 || CallerMetrics.NumInsts < 1000) { + if (CallerMetrics.NumBlocks < 10 && CallerMetrics.NumInsts < 1000) { resetCachedCostInfo(Caller); return; }