[llvm] [llvm-profgen] Add an option to force marking the profile as preinlined (PR #156501)
Lei Wang via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 8 07:42:07 PDT 2025
wlei-llvm wrote:
>
> I was thinking about `csspgo-replay-preinline`: https://github.com/llvm/llvm-project/blame/main/llvm/tools/llvm-profgen/CSPreInliner.cpp#L50
I see, thanks for the check! Seems like it's indeed equivalent, IIRC, the `ContextWasInlined` is from the leaf frame's dwarf/probe context so it should be same to the context directly from the length-1 call-stack (`-ignore-stack-samples`).
>
> I thought we run pre-inliner as long as `csspgo-preinliner` is on, and that flag is on by default and also not affected by whether we ignore stack samples?
>
> Judging from your change, it seems like we don't run pre-inliner for probe-only (`-ignore-stack-samples`)?
IIRC, csspgo-preinliner is only available in CS mode: https://github.com/llvm/llvm-project/blob/main/llvm/tools/llvm-profgen/ProfileGenerator.cpp#L1109C7-L1115, so we don't run/have this for `-ignore-stack-samples`. For my previous experiments, I always use the `-ignore-stack-samples` mode because it consumes significantly less memory and running time.
https://github.com/llvm/llvm-project/pull/156501
More information about the llvm-commits
mailing list