[llvm-commits] [llvm] r131994 - /llvm/trunk/lib/Analysis/InlineCost.cpp
Eli Friedman
eli.friedman at gmail.com
Tue May 24 13:22:24 PDT 2011
Author: efriedma
Date: Tue May 24 15:22:24 2011
New Revision: 131994
URL: http://llvm.org/viewvc/llvm-project?rev=131994&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Analysis/InlineCost.cpp
Modified: llvm/trunk/lib/Analysis/InlineCost.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InlineCost.cpp?rev=131994&r1=131993&r2=131994&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InlineCost.cpp (original)
+++ llvm/trunk/lib/Analysis/InlineCost.cpp Tue May 24 15:22:24 2011
@@ -593,7 +593,7 @@
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;
}
More information about the llvm-commits
mailing list