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.
Paths
| Differential D147651
[PseudoProbe] Encode/Decode FS discriminator ClosedPublic Authored by hoy on Apr 5 2023, 11:54 AM.
Details
Summary 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.
Diff Detail
Event Timelinehoy added a child revision: D147957: [FS-AFDO] Generate pseudo-probe-based profiles with FS-discriminators..Apr 10 2023, 11:47 AM hoy added a parent revision: D148569: [PseudoProbe] Clean up dwarf discriminator and avoid duplicating factor..Apr 17 2023, 2:51 PM
Comment Actions lgtm with a nit, thanks.
This revision is now accepted and ready to land.May 10 2023, 9:17 AM This revision was landed with ongoing or failed builds.May 10 2023, 11:34 AM Closed by commit rG9849291dccee: [PseudoProbe] Encode/Decode FS discriminator (authored by hoy). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 521053 llvm/include/llvm/IR/PseudoProbe.h
llvm/include/llvm/MC/MCPseudoProbe.h
llvm/include/llvm/MC/MCStreamer.h
llvm/lib/CodeGen/AsmPrinter/PseudoProbePrinter.cpp
llvm/lib/MC/MCAsmStreamer.cpp
llvm/lib/MC/MCParser/AsmParser.cpp
llvm/lib/MC/MCPseudoProbe.cpp
llvm/lib/MC/MCStreamer.cpp
llvm/test/tools/llvm-profgen/Inputs/fs-discriminator-probe.perfbin
llvm/test/tools/llvm-profgen/pseudoprobe-decoding-discriminator.test
|
At this layer, there's nothing specific to FS. I think we can just call it HasDiscriminator. This is essentially discriminator to probe, and we just currently use it for FSDiscriminator.
Then s/FSDiscriminator/Discriminator/g for this entire patch.