[llvm] [llvm-profgen] Filter out ambiguous cold profiles during profile generation (PR #81803)
Lei Wang via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 14 17:10:20 PST 2024
================
@@ -975,6 +975,8 @@ class FunctionSamples {
return CallsiteSamples;
}
+ CallsiteSampleMap &getCallsiteSamples() { return CallsiteSamples; }
----------------
wlei-llvm wrote:
yeah, we intentionally removed this.. I got it, will remove this.
>OTOH, I'm wondering do we actually need to filter call site (inlined) samples?
>Also __cxx_global_var_init can inlined only into tls_init, but tls_ininit probably will never be inlined anywhere?
I do see `tls_init` appearing in the `CallsiteSamples`, presumably it can be inlined.
Another thing which is specific to profile matching, we use the flattened profile for profile matching, so the inlinee's samples will be merged into top-level function, then used as the top-level function in profile matching(causing the issues we hit)
> I think only top level functions are indistinguishable, and inlinee's samples can be distinguished and still used by their inliner?
I think you are right, so we can leave it only for top level function if we can ensure it's also fine for profile matching.
https://github.com/llvm/llvm-project/pull/81803
More information about the llvm-commits
mailing list