Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-7436

Build Clang with Profile-Guided Optimization (PGO)

    • rhel-sst-pt-llvm-rust-go
    • ssg_platform_tools
    • 2
    • False
    • Hide

      None

      Show
      None
    • Yes
    • None
    • None
    • None
    • If docs needed, set a value
    • None

      Description of problem:

      Clang supports (https://llvm.org/docs/HowToBuildWithPGO.html) bootstrapping with Profile-Guided Optimization (PGO). It increases Clang performance a lot (+20% according to the official docs and my own tests). The same thing is already enabled for GCC in Fedora (profiledbootstrap option). I think the same thing could be done for Clang since in the current build script I don't see that Clang is built with PGO.

      Actual result:
      Clang package is not PGO-optimized.

      Expected results:
      Provided Clang binaries with Fedora are built with PGO.

      Additional option:
      As an additional option, you could try to build binary with LLVM BOLT (https://github.com/facebookincubator/BOLT/blob/main/bolt/docs/OptimizingClang.md) but I guess it's another question and it's much more complicated topic.

      More about PGO-related optimizations for other software you can find here: https://github.com/zamazan4ik/awesome-pgo

      More about PGO optimizations for other LLVM-based projects (you can be interested in them too) you can find here: https://github.com/llvm/llvm-project/issues/63486

      Also, I created a similar request in other Linux distributions:

              tstellar@redhat.com Thomas Stellard
              jira-bugzilla-migration RH Bugzilla Integration
              Thomas Stellard Thomas Stellard
              qe-baseos-tools-bugs@redhat.com qe-baseos-tools-bugs@redhat.com qe-baseos-tools-bugs@redhat.com qe-baseos-tools-bugs@redhat.com
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: