LLVM Now Using PGO For Building x86_64 Windows Release Binaries: ~22% Faster Builds

Written by Michael Larabel in LLVM on 18 November 2023 at 01:14 PM EST. 9 Comments
LLVM
The LLVM project is now employing profile-guided optimizations (PGO) when building their x86_64 Microsoft Windows release packages. Making use of PGO is able to make their Clang build a stunning 22% faster.

Originally was a pull request to make use of both PGO and ThinLTO for the Windows release packaging. But they ended up dialing that back to just PGO for now. But with PGO + ThinLTO they were finding the installer binary around 5% smaller while the toolchain build around 20% faster.

LLVM logo


With this commit to LLVM that was merged earlier this week just PGO is enabled by default but great results for toolchain performance:
Use PGO for x86_64 windows release packaging (#71067)

Applying this to 17.0.4 makes the toolchain 22% faster (as measured by building clang).

For those long experimenting with LTO and PGO, the results are likely not too surprising. PGO can yield great performance uplift assuming you have generated accurate profiles for the software use. Though due to complexities involved and the need to have accurate profiles, Clang PGO was shot down from the Linux kernel as one example. In any event PGO is one of the exciting compiler optimization techniques for helping to achieve maximum performance.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week