[llvm] [BOLT] Optimize basic block loops to avoid n^2 loop (PR #156243)

Maksim Panchenko via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 23 11:38:15 PDT 2025


maksfb 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`.

https://github.com/llvm/llvm-project/pull/156243


More information about the llvm-commits mailing list