[llvm] r277863 - Remove cold callsite heuristic that is not necessary because of cold callee heuristic.
Dehao Chen via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 5 13:49:04 PDT 2016
Author: dehao
Date: Fri Aug 5 15:49:04 2016
New Revision: 277863
URL: http://llvm.org/viewvc/llvm-project?rev=277863&view=rev
Log:
Remove cold callsite heuristic that is not necessary because of cold callee heuristic.
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=277863&r1=277862&r2=277863&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InlineCost.cpp (original)
+++ llvm/trunk/lib/Analysis/InlineCost.cpp Fri Aug 5 15:49:04 2016
@@ -640,13 +640,11 @@ void CallAnalyzer::updateThreshold(CallS
}
bool HotCallsite = false;
- bool ColdCallsite = false;
uint64_t TotalWeight;
- if (CS.getInstruction()->extractProfTotalWeight(TotalWeight))
- if (PSI->isHotCount(TotalWeight))
- HotCallsite = true;
- else if (PSI->isColdCount(TotalWeight))
- ColdCallsite = true;
+ if (CS.getInstruction()->extractProfTotalWeight(TotalWeight) &&
+ PSI->isHotCount(TotalWeight)) {
+ HotCallsite = true;
+ }
// Listen to the inlinehint attribute or profile based hotness information
// when it would increase the threshold and the caller does not need to
@@ -666,7 +664,7 @@ void CallAnalyzer::updateThreshold(CallS
// do not use the default cold threshold even if it is smaller.
if ((DefaultInlineThreshold.getNumOccurrences() == 0 ||
ColdThreshold.getNumOccurrences() > 0) &&
- (ColdCallee || ColdCallsite) && ColdThreshold < Threshold)
+ ColdCallee && ColdThreshold < Threshold)
Threshold = ColdThreshold;
// Finally, take the target-specific inlining threshold multiplier into
More information about the llvm-commits
mailing list