[all-commits] [llvm/llvm-project] 984929: [PseudoProbe] Encode/Decode FS discriminator
Hongtao Yu via All-commits
all-commits at lists.llvm.org
Wed May 10 11:34:14 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9849291dccee91001dbd0473943f6958413c74af
https://github.com/llvm/llvm-project/commit/9849291dccee91001dbd0473943f6958413c74af
Author: Hongtao Yu <hoy at fb.com>
Date: 2023-05-10 (Wed, 10 May 2023)
Changed paths:
M llvm/include/llvm/IR/PseudoProbe.h
M llvm/include/llvm/MC/MCPseudoProbe.h
M llvm/include/llvm/MC/MCStreamer.h
M llvm/lib/CodeGen/AsmPrinter/PseudoProbePrinter.cpp
M llvm/lib/MC/MCAsmStreamer.cpp
M llvm/lib/MC/MCParser/AsmParser.cpp
M llvm/lib/MC/MCPseudoProbe.cpp
M llvm/lib/MC/MCStreamer.cpp
A llvm/test/tools/llvm-profgen/Inputs/fs-discriminator-probe.perfbin
A llvm/test/tools/llvm-profgen/pseudoprobe-decoding-discriminator.test
Log Message:
-----------
[PseudoProbe] Encode/Decode FS discriminator
Encoding FS discriminators for block probes. Decoding them correspondingly.
The encoding/decoding of FS discriminators are conditional, only for probes with a non-zero discriminator. This saves encoding size, also ensures downwards-compatiblity.
Reviewed By: wenlei
Differential Revision: https://reviews.llvm.org/D147651
Commit: 345fd0c10e90e85243265854ca8f6d9efa14f293
https://github.com/llvm/llvm-project/commit/345fd0c10e90e85243265854ca8f6d9efa14f293
Author: Hongtao Yu <hoy at fb.com>
Date: 2023-05-10 (Wed, 10 May 2023)
Changed paths:
M llvm/include/llvm/ProfileData/SampleProf.h
A llvm/test/tools/llvm-profgen/Inputs/fs-discriminator-probe.raw.prof
A llvm/test/tools/llvm-profgen/fs-discriminator-probe.test
M llvm/tools/llvm-profgen/PerfReader.cpp
M llvm/tools/llvm-profgen/ProfileGenerator.cpp
Log Message:
-----------
[FS-AFDO] Generate pseudo-probe-based profiles with FS-discriminators.
This change enables generating pseudo-probe-based FS-AFDO profiles. The change is straightforward based-on previous change {D147651} by just injecting FS-discriminators into various profile generation spot.
Reviewed By: wenlei
Differential Revision: https://reviews.llvm.org/D147957
Commit: b7d9322b4963e620dfd12246816e6f7b2da5fd88
https://github.com/llvm/llvm-project/commit/b7d9322b4963e620dfd12246816e6f7b2da5fd88
Author: Hongtao Yu <hoy at fb.com>
Date: 2023-05-10 (Wed, 10 May 2023)
Changed paths:
M llvm/include/llvm/IR/PseudoProbe.h
M llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h
M llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
M llvm/lib/CodeGen/MIRSampleProfile.cpp
M llvm/lib/IR/PseudoProbe.cpp
M llvm/lib/Transforms/IPO/SampleProfile.cpp
M llvm/lib/Transforms/IPO/SampleProfileProbe.cpp
A llvm/test/CodeGen/X86/Inputs/fsloader-probe.afdo
A llvm/test/CodeGen/X86/fsafdo_probe2.ll
M llvm/test/Transforms/SampleProfile/pseudo-probe-stale-profile-matching.ll
Log Message:
-----------
[FS-AFDO] Load pseudo probe profile on MIR
This change enables loading pseudo-probe based profile on MIR. Different from the IR profile loader, callsites are excluded from MIR profile loading since they are not assinged a FS discriminator. Using zero as the discriminator is not accurate and would undo the distribution work done by the IR loader based on pseudo probe distribution factor. We reply on block probes only for FS profile loading.
Some refactoring is done to the IR profile loader so that `getProbeWeight` can be shared by both loaders.
Reviewed By: wenlei
Differential Revision: https://reviews.llvm.org/D148584
Compare: https://github.com/llvm/llvm-project/compare/9272d0f07932...b7d9322b4963
More information about the All-commits
mailing list