[PATCH] D158817: [CSSPGO] Refactoring SampleProfileMatcher::runOnFunction

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 29 16:57:48 PDT 2023


hoy added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:2128
+      if (FunctionSamples::ProfileIsProbeBased && isa<PseudoProbeInst>(&I)) {
+        if (std::optional<PseudoProbe> Probe = extractProbe(I))
+          IRAnchors.emplace(LineLocation(Probe->Id, 0), StringRef());
----------------
`extractProbe` can also be used to extract a probe from a callsite. Can this code be unified with the callsite handling code below to avoid the overwrite?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158817/new/

https://reviews.llvm.org/D158817



More information about the llvm-commits mailing list