[PATCH] D60086: [SampleProfile] Check entry count instead of total count to decide if inlined callsite is hot.
Wei Mi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 2 16:20:17 PDT 2019
wmi added a comment.
In D60086#1452234 <https://reviews.llvm.org/D60086#1452234>, @twoh wrote:
> @wmi Thank you for the concrete example! I think what we need for your example is context-sensitive profiling and function specialization, not inlining. Admittedly we don't have an infrastructure in LLVM to support context-sensitive profiling for non-inlined case and we don't perform context sensitive function specialization...
>
> Again, my bigger concern is with using `PSI->isHotCount` to check the function hotness. If we want to stay with the function total count based heuristic, wouldn't it make more sense if we have something like `ProfileSummaryInfo::isFunctionHotInCallGraph`, which actually checks the hotness of the function itself, and use it?
I agree with that. We can create `ProfileSummaryInfo::isFunctionHotInCallGraph` instead of simply using PSI->isHotCount. Comparing against PSI->isHotCount is actually the simplest implementation of ProfileSummaryInfo::isFunctionHotInCallGraph. The mitigating strategy mentioned above could also be added here. You can definitely come up with better way to model the global hotness of inline instance. Another goodness of splitting up the logics to comparing global hotness in different scenarios is it may be easier for performance tuning.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60086/new/
https://reviews.llvm.org/D60086
More information about the llvm-commits
mailing list