This is an archive of the discontinued LLVM Phabricator instance.

[Clang][CMake] Allow using passthrough BOLT in BOLT-PGO.cmake
Needs ReviewPublic

Authored by Amir on Jul 29 2023, 11:03 PM.

Details

Reviewers
phosek
beanz
Group Reviewers
Restricted Project
Summary

Factor out bolt project dependency from Clang-BOLT usage.
Allow using

  • user-specified BOLT: LLVM_BOLT and MERGE_FDATA variables,
  • BOLT from system path (with CMake's find_program),
  • built from bolt project (the only previously supported way).

Customize BOLT-PGO.cmake cache file to build BOLT in first-stage build, and
passthrough and use it in the final clang-bolt invocation (on top of PGO binary).
This avoids building PGO'd BOLT (first instrumented and then optimized), cutting
the build time.

Diff Detail

Event Timeline

Amir created this revision.Jul 29 2023, 11:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 29 2023, 11:03 PM
Amir requested review of this revision.Jul 29 2023, 11:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 29 2023, 11:03 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
Amir updated this revision to Diff 545406.Jul 29 2023, 11:11 PM

Add clang-bolt-profile-deps dependency