Amir Ayupov
76b2915fdb
[Clang][CMake] Use perf-training for Clang-BOLT
Leverage perf-training flow for BOLT profile collection, enabling reproducible
BOLT optimization. Remove the use of bootstrapped build for profile collection.
Test Plan:
- Regular (single-stage) build
```
$ cmake ... -C .../clang/cmake/caches/BOLT.cmake
$ ninja clang-bolt
...
[21/24] Instrumenting clang binary with BOLT
[21/24] Generating BOLT profile for Clang
[23/24] Merging BOLT fdata
Profile from 2 files merged.
[24/24] Optimizing Clang with BOLT
...
1291202496 : executed instructions (-1.1%)
27005133 : taken branches (-71.5%)
...
```
- Two stage build (ThinLTO+InstPGO)
```
$ cmake ... -C .../clang/cmake/caches/BOLT.cmake -C .../clang/cmake/caches/BOLT-PGO.cmake
$ ninja clang-bolt
$ ninja stage2-clang-bolt
...
[2756/2759] Instrumenting clang binary with BOLT
[2756/2759] Generating BOLT profile for Clang
[2758/2759] Merging BOLT fdata
[2759/2759] Optimizing Clang with BOLT
...
BOLT-INFO: 7092 out of 184104 functions in the binary (3.9%) have non-empty execution profile
756531927 : executed instructions (-0.5%)
15399400 : taken branches (-40.3%)
...
```
Reviewed By: beanz
Differential Revision: https://reviews.llvm.org/D143553
2023-05-13 10:36:29 -07:00
..
2023-01-25 02:37:16 +05:30
2021-11-24 14:20:13 -05:00
2023-05-11 09:28:57 -04:00
2022-07-23 16:26:32 +00:00
2023-05-13 10:36:29 -07:00
2023-05-03 17:54:58 +02:00
2021-02-25 11:32:27 +01:00
2023-04-19 15:37:06 +02:00
2022-02-03 15:16:31 -08:00
2020-07-16 21:53:45 +02:00
2021-11-16 10:11:06 -06:00
2023-04-17 15:33:06 +00:00
2021-09-23 21:16:43 +05:30
2020-07-16 21:53:45 +02:00
2022-08-31 09:45:11 -07:00