[all-commits] [llvm/llvm-project] bd1acf: [SampleProfileMatcher] Sample profile duplication ...
HighW4y2H3ll via All-commits
all-commits at lists.llvm.org
Wed Jun 24 20:32:00 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bd1acfcb5d05341bacec042386edef34b987e195
https://github.com/llvm/llvm-project/commit/bd1acfcb5d05341bacec042386edef34b987e195
Author: HighW4y2H3ll <zhenghaohuu at gmail.com>
Date: 2026-06-24 (Wed, 24 Jun 2026)
Changed paths:
M llvm/include/llvm/Transforms/IPO/SampleProfileMatcher.h
M llvm/lib/Transforms/IPO/SampleProfileMatcher.cpp
A llvm/test/Transforms/SampleProfile/Inputs/pseudo-probe-stale-profile-orphan-conflict.prof
A llvm/test/Transforms/SampleProfile/pseudo-probe-stale-profile-orphan-conflict.ll
Log Message:
-----------
[SampleProfileMatcher] Sample profile duplication to avoid stale CFG profile matching conflicts (#202460)
Stale profile matching may map multiple different IR anchors into one
profile anchor because of the common function basename. One example is
`foo(int)` and `foo<bar>(float)` can both be mapped to `foo()` if
`foo()` is the only function that has a profile. And this creates
conflicting CFG matching for `foo(int)` and `foo<bar>(float)` when they
each runs stale profile matching. The CFG matching results will be
overwritten among the conflicting functions. And it will trigger the
following assertation failure:
https://github.com/llvm/llvm-project/blob/7087094b05a1bba64a99474cc501328919e11b4a/llvm/lib/Transforms/IPO/SampleProfileMatcher.cpp#L332-L333
This patch tries to detect this conflict during the stale CG matching,
and create duplicated profiles to avoid CFG matching conflicts.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list