[llvm-branch-commits] [llvm] [BOLT] Add pseudo probe inline tree to YAML profile (PR #107137)
Amir Ayupov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Sep 11 19:19:23 PDT 2024
================
@@ -158,15 +164,35 @@ template <> struct MappingTraits<bolt::BinaryBasicBlockProfile> {
std::vector<bolt::CallSiteInfo>());
YamlIO.mapOptional("succ", BBP.Successors,
std::vector<bolt::SuccessorInfo>());
- YamlIO.mapOptional("pseudo_probes", BBP.PseudoProbes,
+ YamlIO.mapOptional("probes", BBP.PseudoProbes,
std::vector<bolt::PseudoProbeInfo>());
}
};
+namespace bolt {
+struct InlineTreeInfo {
+ uint32_t ParentIndexDelta;
+ uint32_t CallSiteProbe;
+ // Index in PseudoProbeDesc.GUID + 1, 0 for same as previous
+ uint32_t GUIDIndex;
----------------
aaupov wrote:
If you mean using `std::optional`, I don't think so. However we can distinguish `0` from "same as previous" and avoid `idx+1` by using a different default value (e.g. UINT32_MAX) for same as previous.
https://github.com/llvm/llvm-project/pull/107137
More information about the llvm-branch-commits
mailing list