[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
Tue Oct 23 11:59:25 PDT 2018


george.burgess.iv created this revision.
george.burgess.iv added reviewers: rnk, hans.
Herald added a subscriber: arphaman.

Depending on who you ask, PGO grants a 15%-25% improvement in build times when using clang. Sadly, hooking everything up properly to generate a profile and apply it to clang isn't always straightforward. This script (and the accompanying docs) aim to make this process easier; ideally, a single invocation of the given script.

In terms of testing, I've got a cronjob on my Debian box that's meant to run this a few times per week, and I tried manually running it on a puny Gentoo box I have (four whole Atom cores!). Nothing obviously broke. ¯\_(ツ)_/¯

Don't really know who to tag for the review of this; IIRC, I chatted with the two of you about it at the dev conf? Other voices appreciated. :)

FWIW, I don't know if we have a Python style guide, so I just shoved this through yapf with all the defaults on. Happy to paint it any color we like, as long as I can do so with a tool.

Finally, though the focus is clang at the moment, the hope is that this is easily applicable to other LLVM-y tools with minimal effort (e.g. lld, opt, ...). Hence, this lives in llvm/utils and tries to be somewhat ambiguous about naming


https://reviews.llvm.org/D53598

Files:
  docs/HowToBuildWithPGO.rst
  docs/index.rst
  utils/collect_and_build_with_pgo.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53598.170718.patch
Type: text/x-patch
Size: 23917 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181023/0ca16c1b/attachment-0001.bin>


More information about the llvm-commits mailing list