Tweak inlining adjustment factor
Summary:
The current heuristic just looks at the hotness of the caller,
relative to the average hotness of all function entries. The trouble
with this is that there could be 50 callers that are all significantly
hotter than average; but in that case its almost certainly better not
to inline big functions. To try to avoid overweighting, the current
heuristic adds a constant factor - defaulting to 0.1 - so that
functions have to be at least 10x hotter than average before they get
higher weighting; this probably mitigates the lage-number-of-callers
issue in most cases.
This changes the adjustment factor to
pow(callerWight/averageWeight, callerExp) * pow(callerWeight/calleeWeight, calleeExp)
where callerExp and calleeExp are runtime options defaulting to 0.5
This means that callees with few callers get higher weighting than
callees with many callers.
Reviewed By: ottoni
Differential Revision:
D6832577
fbshipit-source-id:
18b0524edbe8401cf4b68af29a51734fa001f489