summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2015-12-16 01:02:44 +0000
committerChris Bieneman <beanz@apple.com>2015-12-16 01:02:44 +0000
commita0e3cedafc36e4ff01a70e8f586dbcd4348599a1 (patch)
tree911719cbce67dc61b8e2dcf9de70d5bc83e6aeb2 /CMakeLists.txt
parente6016fffcdd063b4c7f031da274c24a8150abe68 (diff)
[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
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bc1036ffe9..e035f2d69f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -570,6 +570,7 @@ if( CLANG_INCLUDE_TESTS )
ARGS ${LLVM_LIT_EXTRA_ARGS}
)
endif()
+ add_subdirectory(utils/perf-training)
endif()
option(CLANG_INCLUDE_DOCS "Generate build targets for the Clang docs."