[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 12:31:06 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()) {
----------------
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.


================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:470
+    // After CSPreInliner the key of ProfileMap is no longer accurate for
+    // contex, use the context attached to function samples instead.
+    std::string ContextWithBracket =
----------------
wenlei wrote:
> hoy wrote:
> > Nit: context
> updated.
Trying to understand how keys can change. Do we only remove the profiles from `ProfileMap` once they are merged into base profiles? Are base profiles from the reuse of first non-inlined profiles?


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