summaryrefslogtreecommitdiff
path: root/bolt/lib/Utils/CommandLineOpts.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [BOLT] Control aggregation mode output profile file formatAmir Ayupov2022-09-191-0/+9
| | | | | | | | | | | In perf2bolt and `-aggregate-only` BOLT mode, the output profile file is written in fdata format by default. Provide a knob `-profile-format=[fdata,yaml]` to control the format. Note that `-w` option still dumps in YAML format. Reviewed By: #bolt, maksfb Differential Revision: https://reviews.llvm.org/D133995
* CommandLine: add and use cl::SubCommand::get{All,TopLevel}Nicolai Hähnle2022-08-021-12/+6
| | | | | | | | | | | | | | | Prefer using these accessors to access the special sub-commands corresponding to the top-level (no subcommand) and all sub-commands. This is a preparatory step towards removing the use of ManagedStatic: with a subsequent change, these global instances will be moved to be regular function-scope statics. It is split up to give downstream projects a (albeit short) window in which they can switch to using the accessors in a forward-compatible way. Differential Revision: https://reviews.llvm.org/D129118
* [BOLT] Increase coverage of shrink wrapping [3/5]Rafael Auler2022-07-111-0/+6
| | | | | | | | | | Add the option to run -equalize-bb-counts before shrink wrapping to avoid unnecessarily optimizing some CFGs where profile is inaccurate but we can prove two blocks have the same frequency. Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D126113
* [bolt] Remove unneeded cl::ZeroOrMore for cl::opt optionsFangrui Song2022-06-051-58/+36
|
* Remove unneeded cl::ZeroOrMore for cl::opt optionsFangrui Song2022-06-041-1/+1
| | | | | | Similar to 557efc9a8b68628c2c944678c6471dac30ed9e8e. This commit handles options where cl::ZeroOrMore is more than one line below cl::opt.
* [Hexagon][bolt] Remove unneeded cl::ZeroOrMore for cl::opt options. NFCFangrui Song2022-06-031-1/+0
| | | | Similar to 557efc9a8b68628c2c944678c6471dac30ed9e8e
* [BOLT] Check if LLVM_REVISION is definedAmir Ayupov2022-04-151-1/+6
| | | | | | | | | Handle the case where LLVM_REVISION is undefined (due to LLVM_APPEND_VC_REV=OFF or otherwise) by setting "<unknown>" value as before D123549. Reviewed By: yota9 Differential Revision: https://reviews.llvm.org/D123852
* [BOLT][NFC] Use LLVM_REVISION instead of BOLT_VERSION_STRINGAmir Ayupov2022-04-141-2/+2
| | | | | | | | Remove duplicate version string identification Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D123549
* [BOLT] Set cold sections alignment explicitlyVladislav Khmelevsky2022-03-151-0/+5
| | | | | | | | | The cold text section alignment is set using the maximum alignment value passed to the emitCodeAlignment. In order to calculate tentetive layout right we will set the minimum alignment of such sections to the maximum possible function alignment explicitly. Differential Revision: https://reviews.llvm.org/D121392
* [BOLT] Refactor heatmap to be standalone toolVladislav Khmelevsky2022-02-071-32/+17
| | | | | | | | Separate heatmap from bolt and build it as standalone tool. Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D118946
* [BOLT] Prepare BOLT for unit-testingVladislav Khmelevsky2022-01-271-8/+0
| | | | | | | | | | | | | | This patch adds unit testing support for BOLT. In order to do this we will need at least do this changes on the code level: * Make createMCPlusBuilder accessible externally * Remove positional InputFilename argument to bolt utlity sources And prepare the cmake and lit for the new tests. Vladislav Khmelevsky, Advanced Software Technology Lab, Huawei Reviewed By: maksfb, Amir Differential Revision: https://reviews.llvm.org/D118271
* [BOLT][NFC] Fix file-description commentsMaksim Panchenko2021-12-211-1/+1
| | | | | | Summary: Fix comments at the start of source files. (cherry picked from FBD33274597)
* [BOLT] Fix Windows buildRafael Auler2021-11-111-3/+2
| | | | | | | | Summary: Make BOLT build in VisualStudio compiler and run without crashing on a simple test. Other tests are not running. (cherry picked from FBD32378736)
* Rebase: [NFC] Refactor sources to be buildable in shared modeRafael Auler2021-10-081-0/+232
Summary: Moves source files into separate components, and make explicit component dependency on each other, so LLVM build system knows how to build BOLT in BUILD_SHARED_LIBS=ON. Please use the -c merge.renamelimit=230 git option when rebasing your work on top of this change. To achieve this, we create a new library to hold core IR files (most classes beginning with Binary in their names), a new library to hold Utils, some command line options shared across both RewriteInstance and core IR files, a new library called Rewrite to hold most classes concerned with running top-level functions coordinating the binary rewriting process, and a new library called Profile to hold classes dealing with profile reading and writing. To remove the dependency from BinaryContext into X86-specific classes, we do some refactoring on the BinaryContext constructor to receive a reference to the specific backend directly from RewriteInstance. Then, the dependency on X86 or AArch64-specific classes is transfered to the Rewrite library. We can't have the Core library depend on targets because targets depend on Core (which would create a cycle). Files implementing the entry point of a tool are transferred to the tools/ folder. All header files are transferred to the include/ folder. The src/ folder was renamed to lib/. (cherry picked from FBD32746834)