#
2430a354 |
| 27-Jun-2024 |
shaw young <58664393+shawbyoung@users.noreply.github.com> |
[BOLT][NFC] Move CallGraph from Passes to Core (#96922)
Moved CallGraph and BinaryFunctionCallGraph from Passes to
Core for future use in stale matching.
|
#
52cf0711 |
| 12-Feb-2024 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Log through JournalingStreams (#81524)
Make core BOLT functionality more friendly to being used as a
library instead of in our standalone driver llvm-bolt. To
accomplish this, we augme
[BOLT][NFC] Log through JournalingStreams (#81524)
Make core BOLT functionality more friendly to being used as a
library instead of in our standalone driver llvm-bolt. To
accomplish this, we augment BinaryContext with journaling streams
that are to be used by most BOLT code whenever something needs to
be logged to the screen. Users of the library can decide if logs
should be printed to a file, no file or to the screen, as
before. To illustrate this, this patch adds a new option
`--log-file` that allows the user to redirect BOLT logging to a
file on disk or completely hide it by using
`--log-file=/dev/null`. Future BOLT code should now use
`BinaryContext::outs()` for printing important messages instead of
`llvm::outs()`. A new test log.test enforces this by verifying that
no strings are print to screen once the `--log-file` option is
used.
In previous patches we also added a new BOLTError class to report
common and fatal errors, so code shouldn't call exit(1) now. To
easily handle problems as before (by quitting with exit(1)),
callers can now use
`BinaryContext::logBOLTErrorsAndQuitOnFatal(Error)` whenever code
needs to deal with BOLT errors. To test this, we have fatal.s
that checks we are correctly quitting and printing a fatal error
to the screen.
Because this is a significant change by itself, not all code was
yet ported. Code from Profiler libs (DataAggregator and friends)
still print errors directly to screen.
Co-authored-by: Rafael Auler <rafaelauler@fb.com>
Test Plan: NFC
show more ...
|
#
a5f3d1a8 |
| 12-Feb-2024 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Return Error from BinaryFunctionPass::runOnFunctions (#81521)
As part of the effort to refactor old error handling code that
would directly call exit(1), in this patch we change the
in
[BOLT][NFC] Return Error from BinaryFunctionPass::runOnFunctions (#81521)
As part of the effort to refactor old error handling code that
would directly call exit(1), in this patch we change the
interface to `BinaryFunctionPass` to return an Error on
`runOnFunctions()`. This gives passes the ability to report a
serious problem to the caller (RewriteInstance class), so the
caller may decide how to best handle the exceptional situation.
Co-authored-by: Rafael Auler <rafaelauler@fb.com>
Test Plan: NFC
show more ...
|
#
83f54971 |
| 28-Aug-2023 |
hezuoqiang <hezuoqiang2@huawei.com> |
[BOLT] BL/BH are considered aliases in regreassign
The relationship of X86 registers is shown in the diagram. BL and BH do not have a direct alias relationship. However, if the BH register cannot be
[BOLT] BL/BH are considered aliases in regreassign
The relationship of X86 registers is shown in the diagram. BL and BH do not have a direct alias relationship. However, if the BH register cannot be swapped, then the BX/EBX/RBX registers cannot be swapped as well, which means that BL register also cannot be swapped. Therefore, in the presence of BX/EBX/RBX registers, BL and BH have an alias relationship.
┌────────────────┐ │ RBX │ ├────┬───────────┤ │ │ EBX │ ├────┴──┬────────┤ │ │ BX │ ├───────┼───┬────┤ │ │BH │BL │ └───────┴───┴────┘
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D155098
show more ...
|
#
a37e8a4b |
| 18-Aug-2023 |
hezuoqiang <hezuoqiang2@huawei.com> |
[BOLT] Consider Code Fragments during regreassign
During register swapping, the code fragments associated with the function need to be swapped together (which may be generated during PGO optimizatio
[BOLT] Consider Code Fragments during regreassign
During register swapping, the code fragments associated with the function need to be swapped together (which may be generated during PGO optimization).
Fix https://github.com/llvm/llvm-project/issues/59730
Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D141931
show more ...
|
#
7557b83a |
| 24-Jan-2023 |
Benjamin Kramer <benny.kra@googlemail.com> |
[BOLT] Use range-based implicit def/use accessors. NFCI
|
#
76cfea0c |
| 11-Dec-2022 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Use std::optional for readDWARFExpressionTargetReg
|
#
0972a390 |
| 09-Aug-2022 |
Fangrui Song <i@maskray.me> |
LLVM_FALLTHROUGH => [[fallthrough]]. NFC
|
#
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 ...
|
#
b92436ef |
| 05-Jun-2022 |
Fangrui Song <i@maskray.me> |
[bolt] Remove unneeded cl::ZeroOrMore for cl::opt options
|
#
139744ac |
| 13-May-2022 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Suppress unused variable warnings
Address warnings in Release build without assertions. Tip @tschuett for reporting the issue #55404.
Reviewed By: rafauler
Differential Revision: https
[BOLT][NFC] Suppress unused variable warnings
Address warnings in Release build without assertions. Tip @tschuett for reporting the issue #55404.
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D125475
show more ...
|
#
d63c5a38 |
| 11-May-2022 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Use BitVector::set_bits
Refactor and use `set_bits` BitVector interface.
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D125374
|
#
8cb7a873 |
| 11-May-2022 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Add MCPlus::primeOperands iterator_range
Reviewed By: yota9
Differential Revision: https://reviews.llvm.org/D125397
|
#
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)
|
#
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)
|
#
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 ...
|