This patch sets function as hot if function's entry count is hot/cold.
Details
Diff Detail
Event Timeline
Long term we shouldn't be using the current logic (>= 0.3 * MaxFuncCount). Could you just use only isHotCount/isColdCount and run Spec? If the performance doesn't degrade, then we can just kill the 30% or 1% of MaxFunctionCount logic. If there is a regression, we should either live with the current state of things (ie discard this patch), or move the 30%/1% logic into the inliner (and not call isHotFunction/isColdFunction.
lib/Analysis/ProfileSummaryInfo.cpp | ||
---|---|---|
80 | It is very likely that isHotCount(...) is a superset of the old predicate which means the old predicate is likely to be redundant here. | |
102 | It is likely that isColdCount(..) predicate is a subset of the old predicate -- thus this change likely does not make any behavior difference. To make the new check effective, Either && should be used or remove the old predicate. |
LGTM (after addressing David's comment on separating into two patches)
lib/Analysis/ProfileSummaryInfo.cpp | ||
---|---|---|
154 | Remove this FIXME since isFunctionEntryHot calls isHotCount. |
It is very likely that isHotCount(...) is a superset of the old predicate which means the old predicate is likely to be redundant here.