[llvm] [llvm-profgen] Improve sample profile density (PR #92144)
Lei Wang via llvm-commits
llvm-commits at lists.llvm.org
Fri May 17 11:43:30 PDT 2024
wlei-llvm wrote:
> > However, there is a problem that a high total sample profile can have a very low density, which makes the density number not as representative.
>
> How big is the problem? Like do you see this old heuristic preventing us from getting a consistent density threshold as proxy for performance, because density is less stable?
I didn't dive very deep to the old heuristic, I just guess from the result, I saw many cases show super big number, for example and this come from normal profile.
```
Sample PGO is estimated to optimize better with 3633.9x more samples.
```
That said, as I mentioned in the above comments, there seems a few bugs in the previous work, (another "bug" is it use the total_samples to decide the hot functions(the cutoff num is a block level count)), maybe it's caused by other issue. Anyway, it seems it needs a big overhaul.
https://github.com/llvm/llvm-project/pull/92144
More information about the llvm-commits
mailing list