[PATCH] D53795: [utils] Fix _run_benchmark in collect_and_build_with_pgo.py

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 27 13:55:45 PDT 2018


MaskRay created this revision.
MaskRay added a reviewer: gbiv.
Herald added a reviewer: george.burgess.iv.
Herald added a subscriber: llvm-commits.

Also fix a FIXME in _build_stage1_clang: clang llvm-profdata profile are sufficient


Repository:
  rL LLVM

https://reviews.llvm.org/D53795

Files:
  utils/collect_and_build_with_pgo.py


Index: utils/collect_and_build_with_pgo.py
===================================================================
--- utils/collect_and_build_with_pgo.py
+++ utils/collect_and_build_with_pgo.py
@@ -35,14 +35,6 @@
     """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, target_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 @@
     # 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
 
@@ -258,7 +257,7 @@
     # 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
 
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53795.171410.patch
Type: text/x-patch
Size: 2097 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181027/9e48215c/attachment.bin>


More information about the llvm-commits mailing list