summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/InlineCost.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-05-24 20:22:24 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-05-24 20:22:24 +0000
commitbacb17906a5976ea734a9f5e9533a20e07a8a2fd (patch)
tree57ac6216c1f9b0fee8bde3854275948d98899f14 /llvm/lib/Analysis/InlineCost.cpp
parent7f6176c3f963a9f65d621b55483de2a7e185048e (diff)
downloadbcm5719-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.cpp2
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;
}
OpenPOWER on IntegriCloud