diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-05-24 20:22:24 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-05-24 20:22:24 +0000 |
commit | bacb17906a5976ea734a9f5e9533a20e07a8a2fd (patch) | |
tree | 57ac6216c1f9b0fee8bde3854275948d98899f14 /llvm/lib/Analysis/InlineCost.cpp | |
parent | 7f6176c3f963a9f65d621b55483de2a7e185048e (diff) | |
download | bcm5719-llvm-bacb17906a5976ea734a9f5e9533a20e07a8a2fd.tar.gz bcm5719-llvm-bacb17906a5976ea734a9f5e9533a20e07a8a2fd.zip |
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
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r-- | llvm/lib/Analysis/InlineCost.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp index 9ea34959b99..efde5984c11 100644 --- a/llvm/lib/Analysis/InlineCost.cpp +++ b/llvm/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; } |