forked from OSchip/llvm-project
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. llvm-svn: 131994
This commit is contained in:
parent
7f6176c3f9
commit
bacb17906a
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue