This is an archive of the discontinued LLVM Phabricator instance.

[Inliner] Compute the full cost for the cost benefit analsysis
ClosedPublic

Authored by kazu on Dec 21 2020, 12:13 PM.

Details

Summary

This patch teaches the inliner to compute the full cost for a call
site where the newly introduced cost benefit analysis is enabled.

Note that the cost benefit analysis requires the full cost to be
computed. However, without this patch or the -inline-cost-full
option, the early termination logic would kick in when the cost
exceeds the threshold, so we don't get to perform the cost benefit
analysis. For this reason, we would need to specify four clang
options:

-mllvm -inline-cost-full
-mllvm -inline-enable-cost-benefit-analysis

This patch eliminates the need to specify -inline-cost-full.

Diff Detail

Event Timeline

kazu created this revision.Dec 21 2020, 12:13 PM
kazu requested review of this revision.Dec 21 2020, 12:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 21 2020, 12:13 PM
davidxl accepted this revision.Jan 5 2021, 8:52 AM

lgtm

This revision is now accepted and ready to land.Jan 5 2021, 8:52 AM