[all-commits] [llvm/llvm-project] 738250: [Clang][perf-training] Do build of libLLVMSupport ...

Tom Stellard via All-commits all-commits at lists.llvm.org
Fri Nov 8 15:23:44 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 738250989ce516f02f809bdfde474a039c77e81f
      https://github.com/llvm/llvm-project/commit/738250989ce516f02f809bdfde474a039c77e81f
  Author: Tom Stellard <tstellar at redhat.com>
  Date:   2024-11-08 (Fri, 08 Nov 2024)

  Changed paths:
    M clang/utils/perf-training/bolt.lit.cfg
    M clang/utils/perf-training/bolt.lit.site.cfg.in
    M clang/utils/perf-training/lit.cfg
    M clang/utils/perf-training/lit.site.cfg.in
    A clang/utils/perf-training/llvm-support/build.test

  Log Message:
  -----------
  [Clang][perf-training] Do build of libLLVMSupport for perf training (#111625)

This adds a build of the libLLVMSupport to the lit suite that is used
for generating profile data. This helps to improve both PGO and BOLT
optimization of clang over the existing hello world training program.

I considered building all of LLVM instead of just libLLVMSupport, but
there is only a marginal increase in performance for PGO only builds
when training with a build of all of LLVM, and I didn't think it was
enough to justify the increased build times given that it is the default
configuration.

The benchmark[1] I did showed that using libLLVMSupport for training
gives a 1.35 +- 0.02 speed up for clang optimized with PGO + BOLT vs
just 1.05 +- 0.01 speed up when training with hello world.

For comparison, training with a full LLVM build gave a speed up of 1.35
+- 0.1.

Raw data:

| PGO Training | BOLT Training | Speed Up | Error Range |
| ------------ | ------------- | -------- | ----------- |
| LLVM Support | LLVM Support  | 1.35     | 0.02        |
| LLVM All     | LLVM All      | 1.34     | 0.01        |
| LLVM Support | Hello World   | 1.29     | 0.02        |
| LLVM All     | PGO-ONLY      | 1.27     | 0.02        |
| LLVM Support | PGO-ONLY      | 1.22     | 0.02        |
| Hello World  | Hello World   | 1.05     | 0.01        |
| Hello World  | PGO-ONLY      | 1.03     | 0.01        |

Time it takes to generate profile data (on a 64-core system):

| Training Data | PGO   | BOLT  |
| ------------- | ----- | ----- |
| LLVM All      | 1090s | 3239s |
| LLVM Support  |   91s |  655s |
| Hello World  |    2s |    9s |

[1] Benchmark was compiling SemaDecl.cpp



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list