diff options
author | Fangrui Song <maskray@google.com> | 2018-10-27 22:56:04 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2018-10-27 22:56:04 +0000 |
commit | 442e17ca5a0319f4176c7cc98211c7cc96265b15 (patch) | |
tree | 83174be3d170ed677113ebc5fcb2fa3c02087f7e /llvm/utils/collect_and_build_with_pgo.py | |
parent | 53bd4f4832dcd81627431843685cfc2070d49732 (diff) | |
download | bcm5719-llvm-442e17ca5a0319f4176c7cc98211c7cc96265b15.tar.gz bcm5719-llvm-442e17ca5a0319f4176c7cc98211c7cc96265b15.zip |
[utils] Fix _run_benchmark in collect_and_build_with_pgo.py
Summary: Also fix a FIXME in _build_stage1_clang: clang llvm-profdata profile are sufficient
Reviewers: george.burgess.iv
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D53795
llvm-svn: 345466
Diffstat (limited to 'llvm/utils/collect_and_build_with_pgo.py')
-rwxr-xr-x | llvm/utils/collect_and_build_with_pgo.py | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/llvm/utils/collect_and_build_with_pgo.py b/llvm/utils/collect_and_build_with_pgo.py index 144eed3cc22..8cbeb2b6c51 100755 --- a/llvm/utils/collect_and_build_with_pgo.py +++ b/llvm/utils/collect_and_build_with_pgo.py @@ -35,14 +35,6 @@ def _run_benchmark(env, out_dir, include_debug_info): """The 'benchmark' we run to generate profile data.""" target_dir = env.output_subdir('instrumentation_run') - # `check-llvm` and `check-clang` are cheap ways to increase coverage. The - # former lets us touch on the non-x86 backends a bit if configured, and the - # latter gives us more C to chew on (and will send us through diagnostic - # paths a fair amount, though the `if (stuff_is_broken) { diag() ... }` - # branches should still heavily be weighted in the not-taken direction, - # since we built all of LLVM/etc). - _build_things_in(env, out_dir, what=['check-llvm', 'check-clang']) - # Building tblgen gets us coverage; don't skip it. (out_dir may also not # have them anyway, but that's less of an issue) cmake = _get_cmake_invocation_for_bootstrap_from( @@ -56,6 +48,13 @@ def _run_benchmark(env, out_dir, include_debug_info): # Just build all the things. The more data we have, the better. _build_things_in(env, target_dir, what=['all']) + # `check-llvm` and `check-clang` are cheap ways to increase coverage. The + # former lets us touch on the non-x86 backends a bit if configured, and the + # latter gives us more C to chew on (and will send us through diagnostic + # paths a fair amount, though the `if (stuff_is_broken) { diag() ... }` + # branches should still heavily be weighted in the not-taken direction, + # since we built all of LLVM/etc). + _build_things_in(env, target_dir, what=['check-llvm', 'check-clang']) ### Script @@ -252,13 +251,7 @@ def _build_stage1_clang(env): target_dir = env.output_subdir('stage1') cmake = _get_default_cmake_invocation(env) _run_fresh_cmake(env, cmake, target_dir) - - # FIXME: The full build here is somewhat unfortunate. It's primarily - # because I don't know what to call libclang_rt.profile for arches that - # aren't x86_64 (and even then, it's in a subdir that contains clang's - # current version). It would be nice to figure out what target I can - # request to magically have libclang_rt.profile built for ${host} - _build_things_in(env, target_dir, what=['all']) + _build_things_in(env, target_dir, what=['clang', 'llvm-profdata', 'profile']) return target_dir |