[llvm] [CSSPGO] Fix the issue of missing callee profile matches (PR #85715)

Lei Wang via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 21:49:05 PDT 2024


================
@@ -125,17 +125,15 @@ class PseudoProbeManager {
   }
 
   bool profileIsValid(const Function &F, const FunctionSamples &Samples) const {
-    const auto *Desc = getDesc(F);
-    if (!Desc) {
-      LLVM_DEBUG(dbgs() << "Probe descriptor missing for Function "
-                        << F.getName() << "\n");
+    // The desc for import function is unavailable. Check the function attribute
+    // for mismatch.
+    if (F.hasFnAttribute("profile-checksum-mismatch"))
----------------
wlei-llvm wrote:

Good point, done.

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


More information about the llvm-commits mailing list