[llvm-branch-commits] [llvm] [BOLT] Match blocks with pseudo probes (PR #99891)
Amir Ayupov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Sep 26 11:27:27 PDT 2024
================
@@ -722,6 +770,15 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) {
}
}
+ if (opts::StaleMatchingWithPseudoProbes) {
+ const MCPseudoProbeDecoder *Decoder = BC.getPseudoProbeDecoder();
+ assert(Decoder &&
+ "If pseudo probes are in use, pseudo probe decoder should exist");
+ for (const MCDecodedPseudoProbeInlineTree &TopLev :
+ Decoder->getDummyInlineRoot().getChildren())
+ TopLevelGUIDToInlineTree[TopLev.Guid] = &TopLev;
+ }
+
----------------
aaupov wrote:
We want to set TopLevelGUID... once though, that's why I decided to keep it in top-level location. matchWeightsByHashes would be invoked for every profile basic block.
https://github.com/llvm/llvm-project/pull/99891
More information about the llvm-branch-commits
mailing list