Hi, As discusses earlier, get_original_name is used to match profile binary names to the symbol names in the IR during auto-profile pass.
Hence, we want to strip the compiler added suffixes for names that are generated after auto-profile pass. Names we should strip: * SRA clones (of the form foo.isra.0) * IPA-CP clonse (in the form bar.constprop.123) * Partial inlining clones (foo.part.0, foo.cold) * lto_priv.0 * Nested function as foo.part.0 Others that should not be stripped: * target_clones (foo.arch_x86_64_v2, foo.avx2) * OpenMP related suffixes (.omp_fn.N, .omp_cpyfn.N) Tested by running autoprofiledbootstrap and tree-prof check that exercises auto-profile pass. gcc/ChangeLog: * auto-profile.cc (isAsciiDigit): New. (get_original_name): Strip suffixes only for compiler generated names tat happens after auto-profile. Thanks, Kugan
0001-AutoFDO-Fix-get_original_name-to-strip-only-names-th.patch
Description: 0001-AutoFDO-Fix-get_original_name-to-strip-only-names-th.patch