#
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)
|
#
ccb99dd1 |
| 19-Dec-2021 |
Maksim Panchenko <maks@fb.com> |
[BOLT] Fix profile and tests for nop-removal pass
Summary: Since nops are now removed in a separate pass, the profile is consumed on a CFG with nops. If previously a profile was generated without no
[BOLT] Fix profile and tests for nop-removal pass
Summary: Since nops are now removed in a separate pass, the profile is consumed on a CFG with nops. If previously a profile was generated without nops, the offsets in the profile could be different if branches included nops either as a source or a destination.
This diff adjust offsets to make the profile reading backwards compatible.
(cherry picked from FBD33231254)
show more ...
|
#
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)
|
#
6aa735ce |
| 02-Dec-2021 |
Amir Ayupov <aaupov@fb.com> |
[BOLT] Split functions: support fragments with multiple parents
Summary: Gracefully handle binaries with split functions where two fragments are folded into one, resulting in a fragment with two par
[BOLT] Split functions: support fragments with multiple parents
Summary: Gracefully handle binaries with split functions where two fragments are folded into one, resulting in a fragment with two parent functions.
This behavior is expected in GCC8+ with -O2 optimization level, where both function splitting and ICF are enabled by default.
On the BOLT side, the changes are: - BinaryFunction: allow multiple parent fragments: - `ParentFragment` --> `ParentFragments`, - `setParentFragment` --> `addParentFragment`. - BinaryContext: - `populateJumpTables`: mark fragments to be skipped later, - `registerFragment`: add a name heuristic check, return false if it failed, - `processInterproceduralReferences`: check if `registerFragment` succeeded, otherwise issue a warning, - `skipMarkedFragments`: move out fragment traversal and skipping from `populateJumpTables` into a separate function.
This change fixes an issue where unrelated functions might be registered as fragments:
``` BOLT-WARNING: interprocedural reference between unrelated fragments: bad_gs/1(*2) and amd_decode_mce.cold.27/1(*2) ```
(Linux kernel binary)
(cherry picked from FBD32786688)
show more ...
|
#
ebe51c4d |
| 09-Dec-2021 |
Maksim Panchenko <maks@fb.com> |
[BOLT] Use more ADT data structures for BinaryFunction
Summary: Switched members of BinaryFunction to ADT where it was possible and made sense. As a result, the size of BinaryFunction on x86-64 Linu
[BOLT] Use more ADT data structures for BinaryFunction
Summary: Switched members of BinaryFunction to ADT where it was possible and made sense. As a result, the size of BinaryFunction on x86-64 Linux reduced from 1624 bytes to 1448.
(cherry picked from FBD32981555)
show more ...
|
#
4f91538f |
| 25-Nov-2021 |
Maksim Panchenko <maks@fb.com> |
[BOLT][NFC] Remove misleading debug message
Summary: The debug message for the last fall-through block was printed under the reverse condition, i.e. when the block was not a fall-through. Remove the
[BOLT][NFC] Remove misleading debug message
Summary: The debug message for the last fall-through block was printed under the reverse condition, i.e. when the block was not a fall-through. Remove the debug message. If we'll need such information, we can add a pass with more analysis, i.e. checking the last instruction, if the block is reachable, etc.
(cherry picked from FBD32670816)
show more ...
|
#
ae585be1 |
| 12-Nov-2021 |
Rafael Auler <rafaelauler@fb.com> |
[BOLT] Fix Windows build
Summary: Make BOLT build in VisualStudio compiler and run without crashing on a simple test. Other tests are not running.
(cherry picked from FBD32378736)
|
#
933df2a4 |
| 09-Nov-2021 |
Maksim Panchenko <maks@fb.com> |
[BOLT][NFC] Remove references to internal tasks
(cherry picked from FBD32272387)
|
#
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 ...
|