[llvm] [SampleFDO] Improve stale profile matching by diff algorithm (PR #87375)

via llvm-commits llvm-commits at lists.llvm.org
Wed May 8 17:06:52 PDT 2024


WenleiHe wrote:

> In very soon, I want to use this diff algorithm for other purpose: function renaming matching, which use the edit scripts to compute a similarity of profile and IR, like similarity = equalSet / (equalSet + insertSet + deleteSet), so those insertSet and deleteSet will be used there.

We don't actually need the insert/delete set, instead we only care about the counts/ratios. Can we simply do something like `|equalSet| * 2 / (|seq1| + |seq2|)`

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


More information about the llvm-commits mailing list