#
d2c87699 |
| 24-Jun-2022 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Use range-based STL wrappers
Replace `std::` algorithms taking begin/end iterators with `llvm::` counterparts accepting ranges.
Reviewed By: rafauler
Differential Revision: https://rev
[BOLT][NFC] Use range-based STL wrappers
Replace `std::` algorithms taking begin/end iterators with `llvm::` counterparts accepting ranges.
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D128154
show more ...
|
#
8228c703 |
| 16-Jun-2022 |
Maksim Panchenko <maks@fb.com> |
[BOLT][NFCI] Refactor interface for adding basic blocks
Reviewed By: Amir
Differential Revision: https://reviews.llvm.org/D127935
|
#
a2c4d6d3 |
| 13-Jun-2022 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Forward declare ReorderBlocks for MSVC19
Fix bolt-x86_64-wine-msvc builder: https://lab.llvm.org/buildbot/#/builders/222/builds/1154
Reviewed By: maksfb
Differential Revision: https://
[BOLT][NFC] Forward declare ReorderBlocks for MSVC19
Fix bolt-x86_64-wine-msvc builder: https://lab.llvm.org/buildbot/#/builders/222/builds/1154
Reviewed By: maksfb
Differential Revision: https://reviews.llvm.org/D127612
show more ...
|
#
fd960495 |
| 07-Jun-2022 |
Vladislav Khmelevsky <och95@yandex.ru> |
[BOLT] Set valid index for functions with profiles
Some of the passes that calculates tentative layout like LongJmp and Golang are expecting that only functions with valid index will be located in h
[BOLT] Set valid index for functions with profiles
Some of the passes that calculates tentative layout like LongJmp and Golang are expecting that only functions with valid index will be located in hot text section. But currently functions with valid profiles and not set index are breaking this logic, to fix this we can move the hasValidProfile() condition from AssignSections pass to ReorderFunctions.
Vladislav Khmelevsky, Advanced Software Technology Lab, Huawei
Differential Revision: https://reviews.llvm.org/D127223
show more ...
|
#
b92436ef |
| 05-Jun-2022 |
Fangrui Song <i@maskray.me> |
[bolt] Remove unneeded cl::ZeroOrMore for cl::opt options
|
#
5ac26156 |
| 03-Jun-2022 |
Huan Nguyen <nhuhuan@yahoo.com> |
[BOLT][NFC] Warning for deprecated option '-reorder-blocks=cache+'
Emit warning when using deprecated option '-reorder-blocks=cache+'. Auto switch to option '-reorder-blocks=ext-tsp'.
Test Plan: ``
[BOLT][NFC] Warning for deprecated option '-reorder-blocks=cache+'
Emit warning when using deprecated option '-reorder-blocks=cache+'. Auto switch to option '-reorder-blocks=ext-tsp'.
Test Plan: ``` ninja check-bolt ``` Added a new test cache+-deprecated.test. Run and verify that the upstream tests are passed.
Reviewed By: rafauler, Amir, maksfb
Differential Revision: https://reviews.llvm.org/D126722
show more ...
|
#
bad37981 |
| 13-Apr-2022 |
Amir Ayupov <aaupov@fb.com> |
[BOLT] Fix data race in shortenInstructions
Address ThreadSanitizer warning
Reviewed By: maksfb
Differential Revision: https://reviews.llvm.org/D121338
|
#
dc1cf838 |
| 16-Mar-2022 |
Amir Ayupov <aaupov@fb.com> |
[BOLT] Strip redundant AdSize override prefix
Since LLVM MC now preserves redundant AdSize override prefix (0x67), remove it in BOLT explicitly (-x86-strip-redundant-adsize, on by default).
Test Pl
[BOLT] Strip redundant AdSize override prefix
Since LLVM MC now preserves redundant AdSize override prefix (0x67), remove it in BOLT explicitly (-x86-strip-redundant-adsize, on by default).
Test Plan: `bin/llvm-lit -a bolt/test/X86/addr32.s`
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D120975
show more ...
|
#
19fb5a21 |
| 01-Feb-2022 |
Vladislav Khmelevsky <och95@yandex.ru> |
[BOLT] Add aarch64 support for peephole passes
Enable peephole optimizations for aarch64. Also small code refactoring - add PeepholeOpts under Peepholes class.
Vladislav Khmelevsky, Advanced Softwa
[BOLT] Add aarch64 support for peephole passes
Enable peephole optimizations for aarch64. Also small code refactoring - add PeepholeOpts under Peepholes class.
Vladislav Khmelevsky, Advanced Software Technology Lab, Huawei
Differential Revision: https://reviews.llvm.org/D118732
show more ...
|
#
a9cd49d5 |
| 04-Aug-2021 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Move Offset annotation to Group 1
Summary: Move the annotation to avoid dynamic memory allocations. Improves the CPU time of instrumenting a large binary by 1% (+-0.8%, p-value 0.01)
Te
[BOLT][NFC] Move Offset annotation to Group 1
Summary: Move the annotation to avoid dynamic memory allocations. Improves the CPU time of instrumenting a large binary by 1% (+-0.8%, p-value 0.01)
Test Plan: NFC
Reviewers: maksfb
FBD30091656
show more ...
|
#
b1a107db |
| 10-Jan-2022 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Format braced initializer lists
Summary: Use assignment (`=`) with braced initializer lists when constructing aggregate temporaries in expressions.
https://llvm.org/docs/CodingStandards
[BOLT][NFC] Format braced initializer lists
Summary: Use assignment (`=`) with braced initializer lists when constructing aggregate temporaries in expressions.
https://llvm.org/docs/CodingStandards.html#braced-initializer-lists
(cherry picked from FBD33515669)
show more ...
|
#
f92ab6af |
| 29-Dec-2021 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Fix braces usage in Passes
Summary: Refactor bolt/*/Passes to follow the braces rule for if/else/loop from [LLVM Coding Standards](https://llvm.org/docs/CodingStandards.html).
(cherry p
[BOLT][NFC] Fix braces usage in Passes
Summary: Refactor bolt/*/Passes to follow the braces rule for if/else/loop from [LLVM Coding Standards](https://llvm.org/docs/CodingStandards.html).
(cherry picked from FBD33344642)
show more ...
|
#
2f09f445 |
| 21-Dec-2021 |
Maksim Panchenko <maks@fb.com> |
[BOLT][NFC] Fix file-description comments
Summary: Fix comments at the start of source files.
(cherry picked from FBD33274597)
|
#
08f56926 |
| 19-Dec-2021 |
Vladislav Khmelevsky <vladislav.khmelevskyi@huawei.com> |
[BOLT] Move disassemble optimizations to optimization passes
Summary: The patch moves the shortenInstructions and nop remove to separate binary passes. As a result when llvm-bolt optimizations stage
[BOLT] Move disassemble optimizations to optimization passes
Summary: The patch moves the shortenInstructions and nop remove to separate binary passes. As a result when llvm-bolt optimizations stage will begin the instructions of the binary functions will be absolutely the same as it was in the binary. This is needed for the golang support by llvm-bolt. Some of the tests must be changed, since bb alignment nops might create unreachable BBs in original functions.
Vladislav Khmelevsky, Advanced Software Technology Lab, Huawei
(cherry picked from FBD32896517)
show more ...
|
#
40c2e0fa |
| 15-Dec-2021 |
Maksim Panchenko <maks@fb.com> |
[BOLT][NFC] Reformat with clang-format
Summary: Selectively apply clang-format to BOLT code base.
(cherry picked from FBD33119052)
|
#
69706eaf |
| 09-Dec-2021 |
Maksim Panchenko <maks@fb.com> |
[BOLT] Refactor BinaryBasicBlock to use ADT
Summary: Refactor members of BinaryBasicBlock. Replace some std containers with ADT equivalents. The size of BinaryBasicBlock on x86-64 Linux is reduced f
[BOLT] Refactor BinaryBasicBlock to use ADT
Summary: Refactor members of BinaryBasicBlock. Replace some std containers with ADT equivalents. The size of BinaryBasicBlock on x86-64 Linux is reduced from 232 bytes to 192 bytes.
(cherry picked from FBD33081850)
show more ...
|
#
cbf530bf |
| 01-Dec-2021 |
Maksim Panchenko <maks@fb.com> |
[BOLT] Add pass to normalize CFG
Summary: Some optimizations may remove all instructions in a basic block.
The pass will cleanup the CFG afterwards by removing empty basic blocks and merging duplic
[BOLT] Add pass to normalize CFG
Summary: Some optimizations may remove all instructions in a basic block.
The pass will cleanup the CFG afterwards by removing empty basic blocks and merging duplicate CFG edges.
The normalized CFG is printed under '-print-normalized' option.
(cherry picked from FBD32774360)
show more ...
|
#
60b09997 |
| 26-Oct-2021 |
Maksim Panchenko <maks@fb.com> |
[BOLT][NFC] Do not pass BinaryContext alongside BinaryFunction
Summary: BinaryContext is available via BinaryFunction::getBinaryContext(), hence there's no reason to pass both as arguments to a func
[BOLT][NFC] Do not pass BinaryContext alongside BinaryFunction
Summary: BinaryContext is available via BinaryFunction::getBinaryContext(), hence there's no reason to pass both as arguments to a function.
In a similar fashion, BinaryBasicBlock has an access to BinaryFunction via getFunction(). Eliminate unneeded arguments.
(cherry picked from FBD31921680)
show more ...
|
#
a34c753f |
| 08-Oct-2021 |
Rafael Auler <rafaelauler@fb.com> |
Rebase: [NFC] Refactor sources to be buildable in shared mode
Summary: Moves source files into separate components, and make explicit component dependency on each other, so LLVM build system knows h
Rebase: [NFC] Refactor sources to be buildable in shared mode
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)
show more ...
|