[PATCH] D99146: [CSSPGO][llvm-profgen] Context-sensitive global pre-inliner
Hongtao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 25 17:51:44 PDT 2021
hoy added inline comments.
================
Comment at: llvm/tools/llvm-profgen/CSPreInliner.cpp:63
+
+ // Add calls for context, if both caller and callee has context profile.
+ for (auto &Child : Caller->getAllChildContext()) {
----------------
wenlei wrote:
> hoy wrote:
> > I'm wondering in the future if functions without profile should be considered so that a broader inline decisions can be made regardless of callsite hotness.
> For pre-inlining, we need to have callee profile otherwise there's no profile to be adjusted regardless of whether we inline or not.
>
> For caller profile, we currently requires it to trigger pre-inline, but we could do pre-inline without caller profile. Is that what you meant? Currently compiler's inlining also requires caller profile, so what we have here aligns with compiler.
>
> (Not sure if I get the question, it's building top-down order here, not actual pre-inlining.. )
Sorry for the confusion. I actually meant to explore non-profiled callees (such as getters/setters) here and in `getInlineCandidates` to mimid the situation that both hot callees of those getters/setters and themselves are inlined into the current caller. The getter/setter inlining, though their callsite are not hot, are likely done in prelink CGSCC inlining. I was thinking about simulating the prelink inlining if possible. There's no such need if prelink inlining is disabled.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99146/new/
https://reviews.llvm.org/D99146
More information about the llvm-commits
mailing list