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

via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 14:48:37 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"))
----------------
WenleiHe wrote:

And when both desc and attribute are available, maybe assert they are consistent? 

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


More information about the llvm-commits mailing list