]> granicus.if.org Git - clang/commit
[CMake] Add support for generating profdata for clang from training files
authorChris Bieneman <beanz@apple.com>
Wed, 16 Dec 2015 01:02:44 +0000 (01:02 +0000)
committerChris Bieneman <beanz@apple.com>
Wed, 16 Dec 2015 01:02:44 +0000 (01:02 +0000)
commita0e3cedafc36e4ff01a70e8f586dbcd4348599a1
tree911719cbce67dc61b8e2dcf9de70d5bc83e6aeb2
parente6016fffcdd063b4c7f031da274c24a8150abe68
[CMake] Add support for generating profdata for clang from training files

Summary:
This patch adds support for using LIT to drive generating PGO profile data for clang.

This first pass implementation should work on Linux and Unix based platforms. If you build clang using CMake with LLVM_BUILD_INSTRUMENTED=On the CMake build generates a generate-profdata target that will use the just-built clang to build any test files (see hello_world.cpp as an example). Each test compile will generate profraw files for each clang process. After all tests have run CMake will merge the profraw files using llvm-profdata.

Future opportunities for extension:
* Support for Build->Profile->Build bootstrapping
* Support for linker order file generation using a similar mechanism and the same training data
* Support for Windows

Reviewers: dexonsmith, friss, bogner, cmatthews, vsk, silvas

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D15462

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255740 91177308-0d34-0410-b5e6-96231b3b80d8
CMakeLists.txt
utils/perf-training/CMakeLists.txt [new file with mode: 0644]
utils/perf-training/README.txt [new file with mode: 0644]
utils/perf-training/cxx/hello_world.cpp [new file with mode: 0644]
utils/perf-training/lit.cfg [new file with mode: 0644]
utils/perf-training/lit.site.cfg.in [new file with mode: 0644]
utils/perf-training/perf-helper.py [new file with mode: 0644]