[PATCH] D121862: [ProfSampleLoader] When disable-sample-loader-inlining is true, merge profiles of inlined instances to outlining versions.

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 17 10:12:28 PDT 2022


hoy added a comment.



In D121862#3389570 <https://reviews.llvm.org/D121862#3389570>, @davidxl wrote:

> In D121862#3389529 <https://reviews.llvm.org/D121862#3389529>, @wenlei wrote:
>
>> What's your actual use case that motivated this change?
>>
>> When this was originally added, we used it to disable only pre-link sample loader inlining, in which case we don't want to merge the profiles even when inlining there is skipped. This is because during post-link, sample loader inlining will still happen, so merging profiles during pre-link as if relevant inlining will never happen may cause over-optimize (it was measurable in code size). + at hoy
>
> Good point about the post-link sample loader inlinling. The intention of this internal flag is actually to disable both sample loader inlining for performance experiment purpose (e.g exercising more cost/benefit analysis of regular inlining) -- related effort is kazu@ is doing analysis on context similarity analysis to try to tune down the sample loader inlining.

Can you shed more light on the context similarity analysis? Thanks.

> so yes eventually more sophisticated analysis will rely on moduleinliner.

Do you have plan to merge the moduleinliner and sample loader inliner eventually? How would them be positioned when sample profile is available?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121862/new/

https://reviews.llvm.org/D121862



More information about the llvm-commits mailing list