[llvm] [SamplePGO] Support -salvage-stale-profile without probes too (PR #86116)

Lei Wang via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 20:12:07 PDT 2024


================
@@ -2411,10 +2411,10 @@ void SampleProfileMatcher::runOnFunction(const Function &F) {
   if (ReportProfileStaleness || PersistProfileStaleness)
     recordCallsiteMatchStates(F, IRAnchors, ProfileAnchors, nullptr);
 
-  // Run profile matching for checksum mismatched profile, currently only
-  // support for pseudo-probe.
-  if (SalvageStaleProfile && FunctionSamples::ProfileIsProbeBased &&
-      !ProbeManager->profileIsValid(F, *FSFlattened)) {
+  // Run profile matching for checksum mismatched profile. For probe-based
----------------
wlei-llvm wrote:

Nit: Rephrase or remove this "Run profile matching for checksum mismatched profile", since non-probe doesn't have checksum. 

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


More information about the llvm-commits mailing list