================ @@ -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; + } + ---------------- wlei-llvm wrote:
How about moving this code near to where it's used, i.e the `matchWeightsByHashes`. It seems the ` ... BC.getPseudoProbeDecoder() ...` can be shared there. https://github.com/llvm/llvm-project/pull/99891 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits