[all-commits] [llvm/llvm-project] e06d6e: [SamplePGO] Handle FS discriminators in SampleProf...
Krzysztof Pszeniczny via All-commits
all-commits at lists.llvm.org
Thu May 2 10:33:00 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e06d6ed1ef081eb9858da8066a6036c5dde432eb
https://github.com/llvm/llvm-project/commit/e06d6ed1ef081eb9858da8066a6036c5dde432eb
Author: Krzysztof Pszeniczny <kpszeniczny at google.com>
Date: 2024-05-02 (Thu, 02 May 2024)
Changed paths:
M llvm/lib/Transforms/IPO/SampleProfileMatcher.cpp
M llvm/test/Transforms/SampleProfile/Inputs/non-probe-stale-profile-matching.prof
M llvm/test/Transforms/SampleProfile/non-probe-stale-profile-matching.ll
Log Message:
-----------
[SamplePGO] Handle FS discriminators in SampleProfileMatcher (#90858)
Currently the code uses FunctionSamples::getCallSiteIdentifier which
will sometimes incorrectly guess that FSAFDO discriminators are probe
based and will convert them incorrectly.
This change doesn't affect builds which don't use FSAFDO, it only fixes
sample profile matching with FS discriminators.
The test for this is manually updated to use discriminator value 15,
which is a perfectly valid base discriminator in the FS world, but
satisfies `isPseudoProbeDiscriminator`, so
`getBaseDiscriminatorFromDiscriminator` will incorrectly extract the
probe index from it.
Note: this change only affects how the base discriminators will be
extracted when doing stale profile matching in the IR-level sample
profile loader. It doesn't add stale profile matching to the MIR-level
FS profile loader pass.
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