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 | b1763993398f1c198ff389e9b0a6db1e65b49260 (patch) | |
tree | 4be073537d48ff3da76a29ab87e763e3083df725 /lib/Analysis/InlineCost.cpp | |
parent | 3b32d0240c820a8aa829a950628586512a406ea0 (diff) | |
download | external_llvm-b1763993398f1c198ff389e9b0a6db1e65b49260.zip external_llvm-b1763993398f1c198ff389e9b0a6db1e65b49260.tar.gz external_llvm-b1763993398f1c198ff389e9b0a6db1e65b49260.tar.bz2 |
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
Diffstat (limited to 'lib/Analysis/InlineCost.cpp')
-rw-r--r-- | lib/Analysis/InlineCost.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/InlineCost.cpp b/lib/Analysis/InlineCost.cpp index 9ea3495..efde598 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; } |