Open tpgxyz opened 5 years ago
As BOLT makes the use of LLVM/Clang PGO even more attractive nowadays, support in Meson for PGO and BOLT would be great for easier integration (e.g. for super-optimized Mesa builds).
By the way, using -fprofile-instr-generate
/-fprofile-instr-use
(FrontEnd PGO aka FE PGO) in Clang is not recommended. Instead, -fprofile-generate
/-fprofile-use
(IR PGO) should be used.
Please add option to detect and use LLVM/clang PGO flags and tools when b_pgo=generate/use is passed and when default compiler is set to LLVM/clang.
i.e. b_pgo=generate Set these:
When stage 1 is done, merge the profile data
llvm-profdata merge --output ${name}.profile *.profile.d
b_pgo=use Set these: