[PATCH] D53598: Add docs+a script for building clang/LLVM with PGO
George Burgess IV via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 3 16:13:30 PDT 2018
george.burgess.iv added a comment.
> I notice that you're using LLVM_BUILD_INSTRUMENTED=IR, which corresponds to -fprofile-generate (IR-level profiling), instead of -fprofile-instr-generate (clang-level profiling). Did you play around with both and observe that IR-level profiling gave you better results?
IR-level profiling gave me better results for unrelated projects in the past, so not initially, but it's probably a good idea.
A quick experiment shows that `ninja opt` consumes 2.5% fewer user cycles when clang is optimized with an IR-level profile rather than with a frontend one. Building an arbitrary-but-large cpp file (clang/lib/Sema/SemaOverload.cpp) shows a similar 4% win for the IR profile.
> Btw, I tried this out and got a 20% improvement on a self-host with PGO, which is pretty handy :)
Woohoo!
Repository:
rL LLVM
https://reviews.llvm.org/D53598
More information about the llvm-commits
mailing list