[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:50:07 PDT 2024


WenleiHe wrote:

> > The patch is good in general, but I think this problem is still worth fixing separately?
> 
> Yeah, I have some pending patches to mitigate this issue(use a diff alg), TBH, I'm not sure if that would completely solve this, there are some challenges, such as lack of the anchor in the profile, misleading indirect call, incorrect profile merging..
> 
> Or I'm thinking maybe we can add a defensive check before the matching: if all/most of(tuned by a flag) the profile anchors are matched to the IR, even the checksum is mismatched, we still don't run the stale matching. we can easily get those info from the `FuncCallsiteMatchStates`
> 
> Any thoughts?

I meant the problem that applying stale profile matching to a perfectly matched profile is not a no-op. And we should improve the algorithm to try to make it a no-op, hoping that it will help improve things overall even for mismatched cases.. 

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


More information about the llvm-commits mailing list