#
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 ...
|
#
3abb68a6 |
| 08-May-2022 |
Alexander Yermolovich <ayermolo@fb.com> |
[BOLT][DWARF] Fix assert for split dwarf.
Fixing a small bug where it would assert if CU does not modify .debug_addr section.
Differential Revision: https://reviews.llvm.org/D125181
|
#
ba1ac98c |
| 05-May-2022 |
Alexander Yermolovich <ayermolo@fb.com> |
[BOLT][DWARF] Add version 5 split dwarf support
Added support for DWARF5 Split Dwarf.
Reviewed By: maksfb
Differential Revision: https://reviews.llvm.org/D122988
|
#
014cd37f |
| 21-Apr-2022 |
Alexander Yermolovich <ayermolo@fb.com> |
[BOLT][DWARF] Implement monolithic DWARF5
Added implementation to support DWARF5 in monolithic mode. Next step DWARF5 split dwarf support.
Reviewed By: maksfb
Differential Revision: https://review
[BOLT][DWARF] Implement monolithic DWARF5
Added implementation to support DWARF5 in monolithic mode. Next step DWARF5 split dwarf support.
Reviewed By: maksfb
Differential Revision: https://reviews.llvm.org/D121876
show more ...
|
#
330268ba |
| 04-Apr-2022 |
Argyrios Kyrtzidis <kyrtzidis@apple.com> |
[Support/Hash functions] Change the `final()` and `result()` of the hashing functions to return an array of bytes
Returning `std::array<uint8_t, N>` is better ergonomics for the hashing functions us
[Support/Hash functions] Change the `final()` and `result()` of the hashing functions to return an array of bytes
Returning `std::array<uint8_t, N>` is better ergonomics for the hashing functions usage, instead of a `StringRef`:
* When returning `StringRef`, client code is "jumping through hoops" to do string manipulations instead of dealing with fixed array of bytes directly, which is more natural * Returning `std::array<uint8_t, N>` avoids the need for the hasher classes to keep a field just for the purpose of wrapping it and returning it as a `StringRef`
As part of this patch also:
* Introduce `TruncatedBLAKE3` which is useful for using BLAKE3 as the hasher type for `HashBuilder` with non-default hash sizes. * Make `MD5Result` inherit from `std::array<uint8_t, 16>` which improves & simplifies its API.
Differential Revision: https://reviews.llvm.org/D123100
show more ...
|
#
a44fe319 |
| 25-Feb-2022 |
Alexander Yermolovich <ayermolo@fb.com> |
[BOLT][DWARF] Fix how DW_AT_high_pc [DW_FORM_udata] is handled
We were not handling correctly conversion from DW_AT_high_pc into DW_AT_ranges, when size of DW_AT_high_pc is not 4/8 bytes.
Reviewed
[BOLT][DWARF] Fix how DW_AT_high_pc [DW_FORM_udata] is handled
We were not handling correctly conversion from DW_AT_high_pc into DW_AT_ranges, when size of DW_AT_high_pc is not 4/8 bytes.
Reviewed By: maksfb
Differential Revision: https://reviews.llvm.org/D120528
show more ...
|
#
bd1ebe9d |
| 16-Feb-2022 |
Alexander Yermolovich <ayermolo@fb.com> |
[BOLT][DWARF] Add ability to insert new entries in to DIE
Added ability to append new entries to DIE. This is useful to standadize DWARF4 Split Dwarf, and simplify implementation of DWARF5. Multiple
[BOLT][DWARF] Add ability to insert new entries in to DIE
Added ability to append new entries to DIE. This is useful to standadize DWARF4 Split Dwarf, and simplify implementation of DWARF5. Multiple DIEs can share an abbrev. So currently limitation is that only unique Attributes can be added.
Reviewed By: maksfb
Differential Revision: https://reviews.llvm.org/D119577
show more ...
|
#
290e4823 |
| 14-Feb-2022 |
serge-sans-paille <sguelton@redhat.com> |
Cleanup LLVMDWARFDebugInfo
As usual with that header cleanup series, some implicit dependencies now need to be explicit:
llvm/DebugInfo/DWARF/DWARFContext.h no longer includes: - "llvm/DebugInfo/DW
Cleanup LLVMDWARFDebugInfo
As usual with that header cleanup series, some implicit dependencies now need to be explicit:
llvm/DebugInfo/DWARF/DWARFContext.h no longer includes: - "llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h" - "llvm/DebugInfo/DWARF/DWARFCompileUnit.h" - "llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h" - "llvm/DebugInfo/DWARF/DWARFDebugAranges.h" - "llvm/DebugInfo/DWARF/DWARFDebugFrame.h" - "llvm/DebugInfo/DWARF/DWARFDebugLoc.h" - "llvm/DebugInfo/DWARF/DWARFDebugMacro.h" - "llvm/DebugInfo/DWARF/DWARFGdbIndex.h" - "llvm/DebugInfo/DWARF/DWARFSection.h" - "llvm/DebugInfo/DWARF/DWARFTypeUnit.h" - "llvm/DebugInfo/DWARF/DWARFUnitIndex.h"
Plus llvm/Support/Errc.h not included by a bunch of llvm/DebugInfo/DWARF/DWARF*.h files
Preprocessed lines to build llvm on my setup: after: 1065629059 before: 1066621848
Which is a great diff!
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D119723
show more ...
|
#
57f7c7d9 |
| 09-Feb-2022 |
serge-sans-paille <sguelton@redhat.com> |
Add missing MC includes in bolt/
Changes needed after ef736a1c39f27ef4 that removes some implicit dependencies from MrCV headers.
|
#
9f3f9d19 |
| 31-Jan-2022 |
Alexander Yermolovich <ayermolo@fb.com> |
[BOLT][DWARF] Handle shared abbrev section
We can have a scenario where multiple CUs share an abbrev table. We modify or don't modify one CU, which leads to other CUs having invalid abbrev section.
[BOLT][DWARF] Handle shared abbrev section
We can have a scenario where multiple CUs share an abbrev table. We modify or don't modify one CU, which leads to other CUs having invalid abbrev section. Example that caused it. All of CUs shared the same abbrev table. First CU just had compile_unit and sub_program. It was not modified. Next CU had DW_TAG_lexical_block with DW_AT_low_pc/DW_AT_high_pc converted to DW_AT_low_pc/DW_AT_ranges. We used unmodified abbrev section for first and subsequent CUs. So when parsing subsequent CUs debug info was corrupted.
In this patch we will now duplicate all sections that are modified and are different. This also means that if .debug_types is present and it shares Abbrev table, and they usually are, we now can have two Abbrev tables. One for CU that was modified, and unmodified one for TU.
Reviewed By: maksfb
Differential Revision: https://reviews.llvm.org/D118517
show more ...
|
#
612f0f45 |
| 27-Jan-2022 |
Alexander Yermolovich <ayermolo@fb.com> |
[BOLT][DWARF] Fix gdb index section
Since we now re-write .debug_info the DWARF CU Offsets can change. Just like for .debug_aranges the GDB Index will need to be updated.
Reviewed By: Amir, maksfb
[BOLT][DWARF] Fix gdb index section
Since we now re-write .debug_info the DWARF CU Offsets can change. Just like for .debug_aranges the GDB Index will need to be updated.
Reviewed By: Amir, maksfb
Differential Revision: https://reviews.llvm.org/D118273
show more ...
|
#
f8c7fb49 |
| 30-Oct-2021 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Reduce includes with include-what-you-use
Summary: Removed redundant includes with IWYU
Test Plan: ninja bolt
Reviewers: maksfb
FBD32043568
|
#
ea6c8b01 |
| 15-Jan-2022 |
Alexander Yermolovich <ayermolo@fb.com> |
[BOLT][DWARF] Reduce overhead for sized dealloc
This is a follow up to Fix size mismatch error with jemalloc. 4243b6582cf3bb5fbcde908913d4779ded731321 Although that fix works it increased memory foo
[BOLT][DWARF] Reduce overhead for sized dealloc
This is a follow up to Fix size mismatch error with jemalloc. 4243b6582cf3bb5fbcde908913d4779ded731321 Although that fix works it increased memory footprint. With this patch we go back to original memory footprint.
Reviewed By: maksfb
Differential Revision: https://reviews.llvm.org/D117341
show more ...
|
#
e579f5c6 |
| 05-Jan-2022 |
Alexander Yermolovich <ayermolo@fb.com> |
[BOLT][DWARF] Fix race conditions for debug fission in non-deterministic mode
Summary: Adding mutexes to avoid runtime race conditions.
(cherry picked from FBD33439854)
|
#
1c2f4bbe |
| 16-Nov-2021 |
Alexander Yermolovich <ayermolo@fb.com> |
[BOLT] Rewrite of .debug_info section
Summary: Changed the behavior of how we handle .debug_info section. Instead of patching it will now rewrite it. With this approach we are no longer constrained
[BOLT] Rewrite of .debug_info section
Summary: Changed the behavior of how we handle .debug_info section. Instead of patching it will now rewrite it. With this approach we are no longer constrained to having new values of the same size. It handles re-writing by treating .debug_info as raw data. It copies chunks of data between patches, with new data written in between.
(cherry picked from FBD32519952)
show more ...
|
#
3652483c |
| 20-Dec-2021 |
Rafael Auler <rafaelauler@fb.com> |
[BOLTCore] [NFC] Fix braces usages according to LLVM
Summary: Fix according to Coding Standards doc, section Don't Use Braces on Simple Single-Statement Bodies of if/else/loop Statements. This set o
[BOLTCore] [NFC] Fix braces usages according to LLVM
Summary: Fix according to Coding Standards doc, section Don't Use Braces on Simple Single-Statement Bodies of if/else/loop Statements. This set of changes applies to lib Core only.
(cherry picked from FBD33240028)
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)
|
#
1417f607 |
| 08-Dec-2021 |
Alexander Yermolovich <ayermolo@fb.com> |
[BOLT][DWARF] Fix for abbrev check in DWP case
Summary: For DWP case the AbbreviationsOffset is the offset of the abbrev contribution in the DWP file, so can be none zero.
(cherry picked from FBD3
[BOLT][DWARF] Fix for abbrev check in DWP case
Summary: For DWP case the AbbreviationsOffset is the offset of the abbrev contribution in the DWP file, so can be none zero.
(cherry picked from FBD32961240)
show more ...
|
#
b73c87bc |
| 07-Dec-2021 |
Maksim Panchenko <maks@fb.com> |
[BOLT][DWARF] Force allocation of debug_line in RuntimeDyld
Summary: Currently, RuntimeDyld will not allocate a section without relocations even if such a section is marked allocatable and defines s
[BOLT][DWARF] Force allocation of debug_line in RuntimeDyld
Summary: Currently, RuntimeDyld will not allocate a section without relocations even if such a section is marked allocatable and defines symbols.
When we emit .debug_line for compile units with unchanged code, we output original (input) data, without relocations. If all units are emitted in this way, we will have no relocations in the emitted .debug_line. RuntimeDyld will not allocate the section and as a result we will write an empty .debug_line section.
To workaround the issue, always emit a relocation of RELOC_NONE type when emitting raw contents to debug_line.
(cherry picked from FBD32909869)
show more ...
|
#
45f94abc |
| 28-Oct-2021 |
Maksim Panchenko <maks@fb.com> |
[BOLT][DWARF] Fix rare problem while rewriting debug_abbrev after LTO
Summary: With LTO, it's possible for multiple DWARF compile units to share the same abbreviation section set, i.e. to have the s
[BOLT][DWARF] Fix rare problem while rewriting debug_abbrev after LTO
Summary: With LTO, it's possible for multiple DWARF compile units to share the same abbreviation section set, i.e. to have the same abbrev_offset. When units sharing the same abbrev set are located next to each other and neither of them is being processed (i.e. contain processed functions), it can trigger a bug in BOLT. When this happened, the abbrev set is considered empty. Additionally, different units may patch abbrev section differently.
The fix is to not rely on the next unit offset when detecting abbreviation set boundaries and to delay writing abbrev section until all units are processed.
(cherry picked from FBD31985046)
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 ...
|