mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-05 14:34:55 +00:00
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
This commit is contained in:
parent
3b32d0240c
commit
b176399339
@ -593,7 +593,7 @@ InlineCostAnalyzer::growCachedCostInfo(Function *Caller, Function *Callee) {
|
|||||||
CodeMetrics &CallerMetrics = CachedFunctionInfo[Caller].Metrics;
|
CodeMetrics &CallerMetrics = CachedFunctionInfo[Caller].Metrics;
|
||||||
|
|
||||||
// For small functions we prefer to recalculate the cost for better accuracy.
|
// 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);
|
resetCachedCostInfo(Caller);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user