[PATCH] D70653: [AutoFDO] Properly merge context-sensitive profile of inlinee back to outlined function
Wenlei He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 25 13:42:36 PST 2019
wenlei added a comment.
> The only concern is for inline instance getEntrySamples is not precise and sometimes can have a large difference with the actual head count
Agreed. I think this problem can be mitigated if we run profile inference on inlinee as well before using the count to drive inline decision and then also use the post-inference entry count of inlinee as call site count for profile adjustment. But that itself deserves a separate change, and needs to be evaluated.
For the reason you mentioned, total samples had to be used to drive inline replay here instead of relying on inlinee's entry count which would be a better proximation of call site count. Ideally, if we run profile inference before early inlining, inlinee's entry count can be more reliable and we may use that instead of total samples.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70653/new/
https://reviews.llvm.org/D70653
More information about the llvm-commits
mailing list