[llvm] [SampleFDO] Read call-graph matching recovered top-level function profile (PR #101053)

via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 8 10:59:06 PDT 2024


================
@@ -782,6 +782,26 @@ bool SampleProfileMatcher::functionMatchesProfileHelper(
   float Similarity = 0.0;
 
   const auto *FSFlattened = getFlattenedSamplesFor(ProfFunc);
+  // Check if the function is top-level function. For extended profile format,
+  // if a function profile is unused and it's top-level, even if the profile is
+  // matched, it's not found in the profile. This is because sample reader only
----------------
WenleiHe wrote:

nit: rewrite this sentence and maybe the whole comment :) 
> even if the profile is matched, it's not found in the profile





https://github.com/llvm/llvm-project/pull/101053


More information about the llvm-commits mailing list