This is an archive of the discontinued LLVM Phabricator instance.

[InlineCost] separate stats from CallAnalyzer into InliningStats
Needs ReviewPublic

Authored by fedor.sergeev on Jun 27 2019, 3:16 PM.

Details

Summary

Inline cost analysis done by CallAnalyzer counts various stats about function body
being analyzed. These stats can be useful for later analysis, say, to give additional
bonuses for specific constructs, to use them in prioritization of inlining decisions
when working on a tight budget (a pressing issue for JIT compilers).

These stats are exposed outside of getInlineCost via a callback passed through Params.

Event Timeline

fedor.sergeev created this revision.Jun 27 2019, 3:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 27 2019, 3:16 PM
greened added inline comments.Jul 17 2019, 10:34 AM
llvm/lib/Analysis/InlineCost.cpp
2105

Is there a particular reason you chose to do this via callback rather than an optional passed result argument?