Skip to content

Build clang package with PGO #208188

@zamazan4ik

Description

@zamazan4ik

Describe the bug

LLVM supports building Clang with PGO (https://llvm.org/docs/HowToBuildWithPGO.html). Using PGO for compilers has a huge impact on compiler performance. E.g. many distros are already building GCC (which also supports PGO builds) with PGO. I think for the users would be beneficial to have faster Clang binaries.

Locally I usually build my own Clang version. According to my tests, it could bring up to 20% performance.

Additionally, you could consider using LLVM BOLT as an additional optimization step, but I guess it should be discussed in another issue after the PGO implementation.

Expected behavior

clang package will be PGO-optimized.

Other notes

It's not actually a bug - just an improvement request. Feel free to assign to the more proper category.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: enhancementAdd something new or improve an existing system.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions