[llvm] [BOLT] Optimize basic block loops to avoid n^2 loop (PR #156243)
Jakub Beránek via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 23 14:50:36 PDT 2025
Kobzol wrote:
> Thanks for sharing the logs. Most of the time is spent in split functions optimizations, due to `--split-strategy=cdsplit` being used.
>
> While the CDSplit algorithm can produce the best layout, the improvement over the "regular" function split rarely exceeds 0.5%. Before we speedup CDSplit, it's a tradeoff between the build time and the application performance. Were you able to measure improvement by using CDSplit? If not, you can speed up BOLT processing times significantly by disabling it.
>
> I also recommend using `--icf=safe` over `--icf=all`.
It was actually suggested by Amir :laughing: (https://github.com/rust-lang/rust/pull/119418). We saw relatively decent max RSS wins with CDsplit.
https://github.com/llvm/llvm-project/pull/156243
More information about the llvm-commits
mailing list