[llvm] [AArch64] Add Statistics for Probed Stacks (PR #155661)
Momchil Velikov via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 28 02:15:47 PDT 2025
https://github.com/momchil-velikov requested changes to this pull request.
I'm afraid it's not quite clear *what* exactly we want to count and whether we're counting it.
> STATISTIC(NumProbedStacksFixed, "Number of probed stacks fixed");
> STATISTIC(NumProbedStacksDynamic, "Number of probed stacks dynamic");
The wording here is not quite right, we're counting how many probed stack allocation instructions were replaced, which
is independent of the number of stacks. Stacks could be roughly one per thread and contain many function invocations, thus stack frames, and each stack frame can have zero or more probed stack allocations.
The stats are not quite the number of functions/stack frames as there could be more than one pseudo emitted per function.
They ares also not the number of probe instructions, since each pseudo can be expanded to a sequence containing several probe instructions, moreover probe instructions could be emitted directly.
There's `PROBED_STACKALLOC_DYN` which does not seem to affect the statistics.
There are no tests in the PR.
https://github.com/llvm/llvm-project/pull/155661
More information about the llvm-commits
mailing list