forked from OSchip/llvm-project
[InlineCost] Set LastCallToStaticBonus in ML inlining models.
This patch set LastCallToStaticBonus based on check, it has no noticeable size reduction on an internal workload and linux kernel with Os/Oz. Differential Revision: https://reviews.llvm.org/D124233
This commit is contained in:
parent
4620032ee3
commit
c0022b4bb1
|
@ -1203,6 +1203,10 @@ private:
|
|||
set(InlineCostFeatureIndex::ColdCcPenalty,
|
||||
(F.getCallingConv() == CallingConv::Cold));
|
||||
|
||||
set(InlineCostFeatureIndex::LastCallToStaticBonus,
|
||||
(F.hasLocalLinkage() && F.hasOneLiveUse() &&
|
||||
&F == CandidateCall.getCalledFunction()));
|
||||
|
||||
// FIXME: we shouldn't repeat this logic in both the Features and Cost
|
||||
// analyzer - instead, we should abstract it to a common method in the
|
||||
// CallAnalyzer
|
||||
|
|
Loading…
Reference in New Issue