#
f24c299e |
| 24-Aug-2022 |
Fabian Parzefall <parzefall@fb.com> |
Revert "[BOLT] Towards FunctionLayout const-correctness"
This reverts commit 587d2653420d75ef10f30bd612d86f1e08fe9ea7.
|
#
5065134a |
| 24-Aug-2022 |
Fabian Parzefall <parzefall@fb.com> |
Revert "[BOLT] Allocate FunctionFragment on heap"
This reverts commit 101344af1af82d1633c773b718788eaa813d7f79.
|
#
6304e382 |
| 24-Aug-2022 |
Fabian Parzefall <parzefall@fb.com> |
Revert "[BOLT] Track fragment info for all split fragments"
This reverts commit 7e254818e49454a53bd00e3737007025b62d0f79.
|
#
7e254818 |
| 24-Aug-2022 |
Fabian Parzefall <parzefall@fb.com> |
[BOLT] Track fragment info for all split fragments
To generate all symbols correctly, it is necessary to record the address of each fragment. This patch moves the address info for the main and cold
[BOLT] Track fragment info for all split fragments
To generate all symbols correctly, it is necessary to record the address of each fragment. This patch moves the address info for the main and cold fragments from BinaryFunction to FunctionFragment, where this data is recorded for all fragments.
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D132051
show more ...
|
#
101344af |
| 24-Aug-2022 |
Fabian Parzefall <parzefall@fb.com> |
[BOLT] Allocate FunctionFragment on heap
This changes `FunctionFragment` from being used as a temporary proxy object to access basic block ranges to a heap-allocated object that can store fragment-s
[BOLT] Allocate FunctionFragment on heap
This changes `FunctionFragment` from being used as a temporary proxy object to access basic block ranges to a heap-allocated object that can store fragment-specific information.
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D132050
show more ...
|
#
587d2653 |
| 24-Aug-2022 |
Fabian Parzefall <parzefall@fb.com> |
[BOLT] Towards FunctionLayout const-correctness
A const-qualified reference to function layout allows accessing non-const qualified basic blocks on a const-qualified function. This patch adds or rem
[BOLT] Towards FunctionLayout const-correctness
A const-qualified reference to function layout allows accessing non-const qualified basic blocks on a const-qualified function. This patch adds or removes const-qualifiers where necessary to indicate where basic blocks are used in a non-const manner.
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D132049
show more ...
|
#
37cbbea6 |
| 23-Aug-2022 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Move out handleAArch64IndirectCall
Move the large lambda out of BinaryFunction::disassemble, reducing its size from 255 to 233 LoC.
Reviewed By: rafauler
Differential Revision: https:/
[BOLT][NFC] Move out handleAArch64IndirectCall
Move the large lambda out of BinaryFunction::disassemble, reducing its size from 255 to 233 LoC.
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D132104
show more ...
|
#
c844850b |
| 23-Aug-2022 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Move out handleIndirectBranch
Move the large lambda out of BinaryFunction::disassemble, reducing its size from 295 to 255 LoC.
Differential Revision: https://reviews.llvm.org/D132101
|
#
ec1fbf22 |
| 23-Aug-2022 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Move out handleExternalReference
Move the large lambda out of BinaryFunction::disassemble, reducing its size from 338 to 295 LoC.
Reviewed By: rafauler
Differential Revision: https://r
[BOLT][NFC] Move out handleExternalReference
Move the large lambda out of BinaryFunction::disassemble, reducing its size from 338 to 295 LoC.
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D132100
show more ...
|
#
6cd475f8 |
| 23-Aug-2022 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Move out handlePCRelOperand
Move the large lambda out of BinaryFunction::disassemble, reducing its size from 377 to 338 LoC.
Reviewed By: rafauler
Differential Revision: https://review
[BOLT][NFC] Move out handlePCRelOperand
Move the large lambda out of BinaryFunction::disassemble, reducing its size from 377 to 338 LoC.
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D132099
show more ...
|
#
0f74d191 |
| 19-Aug-2022 |
Fabian Parzefall <parzefall@fb.com> |
[BOLT] Generate sections for multiple fragments
This patch adds support to generate any number of sections that are assigned to fragments of functions that are split more than two-way. With this, a
[BOLT] Generate sections for multiple fragments
This patch adds support to generate any number of sections that are assigned to fragments of functions that are split more than two-way. With this, a function's *nth* split fragment goes into section `.text.cold.n`.
This also changes `FunctionLayout::erase` to make sure, that there are no empty fragments at the end of the function. This sometimes happens when blocks are erased from the function. To avoid creating symbols pointing to these fragments, they need to be removed.
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D130521
show more ...
|
#
a191ea7d |
| 19-Aug-2022 |
Fabian Parzefall <parzefall@fb.com> |
[BOLT] Make exception handling fragment aware
This adds basic fragment awareness in the exception handling passes and generates the necessary symbols for fragments.
Reviewed By: rafauler
Different
[BOLT] Make exception handling fragment aware
This adds basic fragment awareness in the exception handling passes and generates the necessary symbols for fragments.
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D130520
show more ...
|
#
275e075c |
| 19-Aug-2022 |
Fabian Parzefall <parzefall@fb.com> |
[BOLT] Support passing fragments to code emission
This changes code emission such that it can emit specific function fragments instead of scanning all basic blocks of a function and just emitting th
[BOLT] Support passing fragments to code emission
This changes code emission such that it can emit specific function fragments instead of scanning all basic blocks of a function and just emitting those that are hot or cold.
To implement this, `FunctionLayout` explicitly distinguishes the "main" fragment (i.e. the one that contains the entry block and is associated with the original symbol) from "split" fragments. Additionally, `BinaryFunction` receives support for multiple cold symbols - one for each split fragment.
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D130052
show more ...
|
#
d0e29e87 |
| 29-Jul-2022 |
Denis Revunov <revunov.denis@huawei-partners.com> |
[BOLT][AArch64] Ignore functions with islandsInfo during VeneerEliminarion and ICF
Differential Revision: https://reviews.llvm.org/D131881
Reviewed By: yota9
|
#
cdef841f |
| 18-Aug-2022 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Simplify scanExternalRefs
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D132013
|
#
0f8412c1 |
| 17-Aug-2022 |
Fabian Parzefall <parzefall@fb.com> |
[BOLT] Add main fragment to function layout
Functions that do not contain any code still have to be emitted. This occurs on AArch64 where functions can consist only of a constant island. To support
[BOLT] Add main fragment to function layout
Functions that do not contain any code still have to be emitted. This occurs on AArch64 where functions can consist only of a constant island. To support fragment semantics in code emission, this commits adds a guaranteed main fragment to function layout. This fragment might be empty, but allows us omit checks whether the function is empty in most places.
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D130051
show more ...
|
#
19eb908e |
| 03-Aug-2022 |
Rafael Auler <rafaelauler@fb.com> |
[BOLT] Remove always true if statement
Got a warning from GCC when building this.
Reviewed By: Amir
Differential Revision: https://reviews.llvm.org/D131092
|
#
b498a899 |
| 30-Jul-2022 |
Kazu Hirata <kazu@google.com> |
[bolt] Remove redundaunt control-flow statements (NFC)
Identified with readability-redundant-control-flow.
|
#
8477bc67 |
| 17-Jul-2022 |
Fabian Parzefall <parzefall@fb.com> |
[BOLT] Add function layout class
This patch adds a dedicated class to keep track of each function's layout. It also lays the groundwork for splitting functions into multiple fragments (as opposed to
[BOLT] Add function layout class
This patch adds a dedicated class to keep track of each function's layout. It also lays the groundwork for splitting functions into multiple fragments (as opposed to a strict hot/cold split).
Reviewed By: maksfb
Differential Revision: https://reviews.llvm.org/D129518
show more ...
|
#
d55dfeaf |
| 14-Jul-2022 |
Fabian Parzefall <parzefall@fb.com> |
[BOLT] Replace uses of layout with basic block list
As we are moving towards support for multiple fragments, loops that iterate over all basic blocks of a function, but do not depend on the order of
[BOLT] Replace uses of layout with basic block list
As we are moving towards support for multiple fragments, loops that iterate over all basic blocks of a function, but do not depend on the order of basic blocks in the final layout, should iterate over binary functions directly, rather than the layout.
Eventually, all loops using the layout list should either iterate over the function, or be aware of multiple layouts. This patch replaces references to binary function's block layout with the binary function itself where only little code changes are necessary.
Reviewed By: maksfb
Differential Revision: https://reviews.llvm.org/D129585
show more ...
|
#
05523dc3 |
| 14-Jul-2022 |
Huan Nguyen <nhuhuan@yahoo.com> |
[BOLT] Support multiple parents for split jump table
There are two assumptions regarding jump table: (a) It is accessed by only one fragment, say, Parent (b) All entries target instructions in Paren
[BOLT] Support multiple parents for split jump table
There are two assumptions regarding jump table: (a) It is accessed by only one fragment, say, Parent (b) All entries target instructions in Parent
For (a), BOLT stores jump table entries as relative offset to Parent. For (b), BOLT treats jump table entries target somewhere out of Parent as INVALID_OFFSET, including fragment of same split function.
In this update, we extend (a) and (b) to include fragment of same split functinon. For (a), we store jump table entries in absolute offset instead. In addition, jump table will store all fragments that access it. A fragment uses this information to only create label for jump table entries that target to that fragment.
For (b), using absolute offset allows jump table entries to target fragments of same split function, i.e., extend support for split jump table. This can be done using relocation (fragment start/size) and fragment detection heuristics (e.g., using symbol name pattern for non-stripped binaries).
For jump table targets that can only be reached by one fragment, we mark them as local label; otherwise, they would be the secondary function entry to the target fragment.
Test Plan ``` ninja check-bolt ```
Reviewed By: Amir
Differential Revision: https://reviews.llvm.org/D128474
show more ...
|
#
35efe1d8 |
| 06-Jul-2022 |
Vladislav Khmelevsky <och95@yandex.ru> |
[BOLT][AArch64] Handle gold linker veneers
The gold linker veneers are written between functions without symbols, so we to handle it specially in BOLT.
Vladislav Khmelevsky, Advanced Software Techn
[BOLT][AArch64] Handle gold linker veneers
The gold linker veneers are written between functions without symbols, so we to handle it specially in BOLT.
Vladislav Khmelevsky, Advanced Software Technology Lab, Huawei
Differential Revision: https://reviews.llvm.org/D129260
show more ...
|
#
42465efd |
| 09-Mar-2022 |
Rafael Auler <rafaelauler@fb.com> |
[BOLT] Increase coverage of shrink wrapping [1/5]
Change how function score is calculated and provide more detailed statistics when reporting back frame optimizer and shrink wrapping results. In thi
[BOLT] Increase coverage of shrink wrapping [1/5]
Change how function score is calculated and provide more detailed statistics when reporting back frame optimizer and shrink wrapping results. In this new statistics, we provide dynamic coverage numbers. The main metric for shrink wrapping is the number of executed stores that were saved because of shrink wrapping (push instructions that were either entirely moved away from the hot block or converted to a stack adjustment instruction). There is still a number of reduced load instructions (pop) that we are not counting at the moment. Also update alloc combiner to report dynamic numbers, as well as frame optimizer.
For debugging purposes, we also include a list of top 10 functions optimized by shrink wrapping. These changes are aimed at better understanding the impact of shrink wrapping in a given binary.
We also remove an assertion in dataflow analysis to do not choke on empty functions (which makes no sense).
Reviewed By: Amir
Differential Revision: https://reviews.llvm.org/D126111
show more ...
|
#
798e92c6 |
| 30-Jun-2022 |
Amir Ayupov <aaupov@fb.com> |
[BOLT] Respect shouldPrint in dump-dot-all
Don't dump dot CFG graph for functions that should not be printed.
Reviewed By: rafauler, maksfb
Differential Revision: https://reviews.llvm.org/D128699
|
#
fc2d96c3 |
| 29-Jun-2022 |
Rafael Auler <rafaelauler@fb.com> |
Revert "[BOLT][AArch64] Handle gold linker veneers"
This reverts commit 425dda76e9fac93117289fd68a2abdfb1e4a0ba5.
This commit is currently causing BOLT to crash in one of our binaries and needs a b
Revert "[BOLT][AArch64] Handle gold linker veneers"
This reverts commit 425dda76e9fac93117289fd68a2abdfb1e4a0ba5.
This commit is currently causing BOLT to crash in one of our binaries and needs a bit more checking to make sure it is safe to land.
show more ...
|