[llvm-branch-commits] [llvm] [llvm-profgen] Account for indirect-call promotion limits in the CS pre-inliner (PR #243631)
Wei Wang via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Nov 18 09:55:16 PST 2026
================
@@ -451,10 +456,12 @@ class MCPseudoProbeDecoder {
const Uint64Set &GuidFilter);
// Decode pseudo_probe section to build address to probes map for specifed
- // functions only.
+ // functions only. If \p Callback is set, also call it for every probe in the
+ // section, including the probes of functions that the GUID filter skips.
LLVM_ABI bool buildAddress2ProbeMap(const uint8_t *Start, std::size_t Size,
const Uint64Set &GuildFilter,
- const Uint64Map &FuncStartAddrs);
+ const Uint64Map &FuncStartAddrs,
+ ProbeCallback Callback = nullptr);
----------------
apolloww wrote:
Why do we need callback here, which updates the ABI? From the comment, this is for getting all the probes that map to indirect call, including those without any sample. But do we care about those without samples? If not, we can move the construction of `IndirectCallProbes` somewhere here
https://github.com/llvm/llvm-project/blob/acfb7759cf64f4e81fbbbdaccf2d40aa22c6b42b/llvm/tools/llvm-profgen/ProfiledBinary.cpp#L568 and guard it with `EnableCSPreInliner && CSPreinlHonorICPLimits`. This way, the change is local to llvm-profgen.
https://github.com/llvm/llvm-project/pull/243631
More information about the llvm-branch-commits
mailing list