Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4 |
|
#
78bfcc59 |
| 02-Nov-2024 |
Fangrui Song <i@maskray.me> |
[MC] Export MCDXContainerObjectWriter
Similar to other ObjectWriter classes.
|
Revision tags: llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1 |
|
#
f729c09c |
| 24-Jul-2024 |
Fangrui Song <i@maskray.me> |
MC: Inline createMachObjectWriter into MCAsmBackend
We could do the same to COFF once WinCOFFObjectWriter is cleaned up (#100303).
|
Revision tags: llvmorg-20-init |
|
#
2db576c8 |
| 23-Jul-2024 |
Fangrui Song <i@maskray.me> |
ELFObjectWriter: Remove unneeded subclasses
|
#
7c83b7ef |
| 01-Jul-2024 |
Fangrui Song <i@maskray.me> |
[MC] Remove two unused parameters from MCAsmBackend::fixupNeedsRelaxation
fixupNeedsRelaxation is a simple implementation for fixupNeedsRelaxationAdvanced. Its users do not utilize MCAsmLayout or MC
[MC] Remove two unused parameters from MCAsmBackend::fixupNeedsRelaxation
fixupNeedsRelaxation is a simple implementation for fixupNeedsRelaxationAdvanced. Its users do not utilize MCAsmLayout or MCRelaxableFragment.
Follow-up to 22c7317f1e954b34a46640db5d509bae1c633348 ("[MC] Remove the MCAsmLayout parameter from relocation related functions").
show more ...
|
#
22c7317f |
| 01-Jul-2024 |
Fangrui Song <i@maskray.me> |
[MC] Remove the MCAsmLayout parameter from relocation related functions
|
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5 |
|
#
1df5ea29 |
| 09-Nov-2023 |
Fangrui Song <i@maskray.me> |
[RISCV] Support R_RISCV_SET_ULEB128/R_RISCV_SUB_ULEB128 for .uleb128 directives
For a label difference like `.uleb128 A-B`, MC folds A-B even if A and B are separated by a RISC-V linker-relaxable in
[RISCV] Support R_RISCV_SET_ULEB128/R_RISCV_SUB_ULEB128 for .uleb128 directives
For a label difference like `.uleb128 A-B`, MC folds A-B even if A and B are separated by a RISC-V linker-relaxable instruction. This incorrect behavior is currently abused by DWARF v5 .debug_loclists/.debug_rnglists (DW_LLE_offset_pair/DW_RLE_offset_pair entry kinds) implemented in Clang/LLVM (see https://github.com/ClangBuiltLinux/linux/issues/1719 for an instance).
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/commit/96d6e190e9fc04a8517f9ff7fb9aed3e9876cbd6 defined R_RISCV_SET_ULEB128/R_RISCV_SUB_ULEB128. This patch generates such a pair of relocations to represent A-B that should not be folded. GNU assembler computes the directive size by ignoring shrinkable section content, therefore after linking the value of A-B cannot use more bytes than the reserved number (`final size of uleb128 value at offset ... exceeds available space`). We make the same assumption. ``` w1: call foo w2: .space 120 w3: .uleb128 w2-w1 # 1 byte, 0x08 .uleb128 w3-w1 # 2 bytes, 0x80 0x01 ```
We do not conservatively reserve 10 bytes (maximum size of an uleb128 for uint64_t) as that would pessimize DWARF v5 DW_LLE_offset_pair/DW_RLE_offset_pair, nullifying the benefits of introducing R_RISCV_SET_ULEB128/R_RISCV_SUB_ULEB128 relocations.
The supported expressions are limited. For example,
* non-subtraction `.uleb128 A` is not allowed * `.uleb128 A-B`: report an error unless A and B are both defined and in the same section
The new cl::opt `-riscv-uleb128-reloc` can be used to suppress the relocations.
Reviewed By: asb
Differential Revision: https://reviews.llvm.org/D157657
show more ...
|
Revision tags: llvmorg-17.0.4, llvmorg-17.0.3 |
|
#
4a0ccfa8 |
| 13-Oct-2023 |
Kazu Hirata <kazu@google.com> |
Use llvm::endianness::{big,little,native} (NFC)
Note that llvm::support::endianness has been renamed to llvm::endianness while becoming an enum class as opposed to an enum. This patch replaces suppo
Use llvm::endianness::{big,little,native} (NFC)
Note that llvm::support::endianness has been renamed to llvm::endianness while becoming an enum class as opposed to an enum. This patch replaces support::{big,little,native} with llvm::endianness::{big,little,native}.
show more ...
|
#
a9d50568 |
| 11-Oct-2023 |
Kazu Hirata <kazu@google.com> |
Use llvm::endianness (NFC)
Now that llvm::support::endianness has been renamed to llvm::endianness, we can use the shorter form. This patch replaces support::endianness with llvm::endianness.
|
Revision tags: llvmorg-17.0.2 |
|
#
3adc2a0b |
| 29-Sep-2023 |
Kai Nacke <kai.peter.nacke@ibm.com> |
[SystemZ/zOS/GOFF] Implement GOFF writer for empty files.
Set ups the infrastructure to create an empty GOFF file. Also adds a GOFF writer which writes only HDR/END records.
Reviewed By: jhenderson
[SystemZ/zOS/GOFF] Implement GOFF writer for empty files.
Set ups the infrastructure to create an empty GOFF file. Also adds a GOFF writer which writes only HDR/END records.
Reviewed By: jhenderson, kpn
Differential Revision: https://reviews.llvm.org/D111437
show more ...
|
Revision tags: llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3 |
|
#
90dbd586 |
| 09-Aug-2023 |
Fangrui Song <i@maskray.me> |
[MC] Remove FK_Data_6b
D58335 introduced FK_Data_6b for emitting R_RISCV_SET6/R_RISCV_SUB6 in .eh_frame/.debug_frame.
This is no longer needed after commit c8ed138c34ddb22610f18468c1b7938f9e2abae5
[MC] Remove FK_Data_6b
D58335 introduced FK_Data_6b for emitting R_RISCV_SET6/R_RISCV_SUB6 in .eh_frame/.debug_frame.
This is no longer needed after commit c8ed138c34ddb22610f18468c1b7938f9e2abae5 removed unneeded fixup kinds for R_RISCV_{SET,ADD,SUB}* and getKindForSizeInBits.
show more ...
|
Revision tags: llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init |
|
#
e6fed063 |
| 29-Jun-2023 |
Fangrui Song <i@maskray.me> |
[RISCV] Make linker-relaxable instructions terminate MCDataFragment
`MCExpr::evaluateAsAbsolute` has a longstanding bug. When the MCAssembler is non-null and the MCAsmLayout is null, it may incorrec
[RISCV] Make linker-relaxable instructions terminate MCDataFragment
`MCExpr::evaluateAsAbsolute` has a longstanding bug. When the MCAssembler is non-null and the MCAsmLayout is null, it may incorrectly fold A-B even if A and B are separated by a linker-relaxable instruction. This behavior can suppress some ADD/SUB relocations and lead to wrong results if the linker performs relaxation.
To fix the bug, ensure that linker-relaxable instructions only appear at the end of an MCDataFragment, thereby making them terminate the fragment. When computing A-B, suppress folding if A and B are separated by a linker-relaxable instruction.
* `.subsection` now correctly give errors for non-foldable expressions. * gen-dwarf.s will pass even if we add back the .debug_line or .eh_frame/.debug_frame code from D150004 * This will fix suppressed relocation when we add R_RISCV_SET_ULEB128/R_RISCV_SUB_ULEB128.
In the future, we should investigate the desired behavior for `MCExpr::evaluateAsAbsolute` when both MCAssembler and MCAsmLayout are non-null.
(Note: MCRelaxableFragment is only for assembler-relaxation. If we ever need linker-relaxable MCRelaxableFragment, we would need to adjust RISCVMCExpr.cpp (D58943/D73211).)
Depends on D153096
Differential Revision: https://reviews.llvm.org/D153097
show more ...
|
#
82dff24b |
| 26-Jun-2023 |
Haohai Wen <haohai.wen@intel.com> |
Reland [COFF] Support -gsplit-dwarf for COFF on Windows
This relands 3eee5aa528abd67bb6d057e25ce1980d0d38c445 with fixes.
|
#
b851308b |
| 25-Jun-2023 |
Nico Weber <thakis@chromium.org> |
Revert "[COFF] Support -gsplit-dwarf for COFF on Windows"
This reverts commit 3eee5aa528abd67bb6d057e25ce1980d0d38c445.
Breaks tests on mac, see https://reviews.llvm.org/D152785#4447118
|
#
3eee5aa5 |
| 25-Jun-2023 |
Haohai Wen <haohai.wen@intel.com> |
[COFF] Support -gsplit-dwarf for COFF on Windows
D152340 has split WinCOFFObjectWriter to WinCOFFWriter. This patch adds another WinCOFFWriter as DwoWriter to write Dwo sections to dwo file. Driver
[COFF] Support -gsplit-dwarf for COFF on Windows
D152340 has split WinCOFFObjectWriter to WinCOFFWriter. This patch adds another WinCOFFWriter as DwoWriter to write Dwo sections to dwo file. Driver options are also updated accordingly to support -gsplit-dwarf in CL mode.
e.g. $ clang-cl -c -gdwarf -gsplit-dwarf foo.c
Like what -gsplit-dwarf did in ELF, using this option will create DWARF object (.dwo) file. DWARF debug info is split between COFF object and DWARF object file. It can reduce the executable file size especially for large project.
Reviewed By: skan, MaskRay
Differential Revision: https://reviews.llvm.org/D152785
show more ...
|
#
5b1c62c0 |
| 12-Jun-2023 |
oontvoo <vyng@google.com> |
[MC][MachO]Do not emit DWARF for no-personality case
Detail: Follow up to D144999, where we emitted DWARF for non-canonical personality.
Reviewed By: jyknight
Differential Revision: https://review
[MC][MachO]Do not emit DWARF for no-personality case
Detail: Follow up to D144999, where we emitted DWARF for non-canonical personality.
Reviewed By: jyknight
Differential Revision: https://reviews.llvm.org/D152540
show more ...
|
Revision tags: llvmorg-16.0.6 |
|
#
e60b30d5 |
| 06-Jun-2023 |
Vy Nguyen <vyng@google.com> |
Reland "D144999 [MC][MachO]Only emits compact-unwind format for "canonical" personality symbols. For the rest, use DWARFs."
Reasons for rolling forward: - the crash reported from Chromium was fi
Reland "D144999 [MC][MachO]Only emits compact-unwind format for "canonical" personality symbols. For the rest, use DWARFs."
Reasons for rolling forward: - the crash reported from Chromium was fixed in D151824 (not related to this patch at all) - since D152824 was committed, it should now be safe to roll this forward.
New change: - add an additional _ in name check
This reverts commit 4980eead4d0b4666d53dad07afb091375b3a13a0.
show more ...
|
Revision tags: llvmorg-16.0.5 |
|
#
4980eead |
| 19-May-2023 |
Nico Weber <thakis@chromium.org> |
Revert "[RFC][MC][MachO]Only emits compact-unwind format for "canonical" personality symbols. For the rest, use DWARFs."
This reverts commit 09aaf53a05e3786eea374f3ce57574225036412d. Causes toolchai
Revert "[RFC][MC][MachO]Only emits compact-unwind format for "canonical" personality symbols. For the rest, use DWARFs."
This reverts commit 09aaf53a05e3786eea374f3ce57574225036412d. Causes toolchain asserts building libc++ for x86_64, see https://reviews.llvm.org/D144999#4356215
show more ...
|
Revision tags: llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4 |
|
#
09aaf53a |
| 28-Feb-2023 |
Vy Nguyen <vyng@google.com> |
[RFC][MC][MachO]Only emits compact-unwind format for "canonical" personality symbols. For the rest, use DWARFs.
Details: https://github.com/rust-lang/rust/issues/102754
The MachO format uses 2 bits
[RFC][MC][MachO]Only emits compact-unwind format for "canonical" personality symbols. For the rest, use DWARFs.
Details: https://github.com/rust-lang/rust/issues/102754
The MachO format uses 2 bits to encode these personality funtions, with 0 reserved for "no-personality". This means we can only have up to 3 personality. There are already three popular personalities: __gxx_personality_v0, __gcc_personality_v0, and __objc_personality_v0. As a result, any system that needs custom-personality will run into a problem.
This patch implemented jyknight's proposal to simply force DWARFs for all non-canonical personality functions.
Differential Revision: https://reviews.llvm.org/D144999
show more ...
|
Revision tags: llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7 |
|
#
405fc404 |
| 07-Dec-2022 |
Kazu Hirata <kazu@google.com> |
[ADT] Don't including None.h (NFC)
These source files no longer use None, so they do not need to include None.h.
This is part of an effort to migrate from llvm::Optional to std::optional:
https://
[ADT] Don't including None.h (NFC)
These source files no longer use None, so they do not need to include None.h.
This is part of an effort to migrate from llvm::Optional to std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
show more ...
|
#
f4c16c44 |
| 04-Dec-2022 |
Fangrui Song <i@maskray.me> |
[MC] llvm::Optional => std::optional
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
|
#
aadaafac |
| 03-Dec-2022 |
Kazu Hirata <kazu@google.com> |
[llvm] Use std::nullopt instead of None (NFC)
This patch mechanically replaces None with std::nullopt where the compiler would warn if None were deprecated. The intent is to reduce the amount of ma
[llvm] Use std::nullopt instead of None (NFC)
This patch mechanically replaces None with std::nullopt where the compiler would warn if None were deprecated. The intent is to reduce the amount of manual work required in migrating from Optional to std::optional.
This is part of an effort to migrate from llvm::Optional to std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
show more ...
|
Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1 |
|
#
62b8a61d |
| 09-Sep-2022 |
Joe Loser <joeloser@fastmail.com> |
[llvm] Remove includes of `llvm/Support/STLArrayExtras.h`
`llvm` and downstream internal callers no longer use `array_lengthof`, so drop the include everywhere.
Differential Revision: https://revie
[llvm] Remove includes of `llvm/Support/STLArrayExtras.h`
`llvm` and downstream internal callers no longer use `array_lengthof`, so drop the include everywhere.
Differential Revision: https://reviews.llvm.org/D133600
show more ...
|
#
5e96cea1 |
| 07-Sep-2022 |
Joe Loser <joeloser@fastmail.com> |
[llvm] Use std::size instead of llvm::array_lengthof
LLVM contains a helpful function for getting the size of a C-style array: `llvm::array_lengthof`. This is useful prior to C++17, but not as helpf
[llvm] Use std::size instead of llvm::array_lengthof
LLVM contains a helpful function for getting the size of a C-style array: `llvm::array_lengthof`. This is useful prior to C++17, but not as helpful for C++17 or later: `std::size` already has support for C-style arrays.
Change call sites to use `std::size` instead.
Differential Revision: https://reviews.llvm.org/D133429
show more ...
|
Revision tags: llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5 |
|
#
3adc908b |
| 06-Jun-2022 |
Chris Bieneman <chris.bieneman@me.com> |
[DirectX][MC] Add MC support for DXContainer
DXContainer files resemble traditional object files in that they are comprised of parts which resemble sections. Adding DXContainer as an object file for
[DirectX][MC] Add MC support for DXContainer
DXContainer files resemble traditional object files in that they are comprised of parts which resemble sections. Adding DXContainer as an object file format in the MC layer will allow emitting DXContainer objects through the normal object emission pipeline.
Differential Revision: https://reviews.llvm.org/D127165
show more ...
|
Revision tags: llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2 |
|
#
6c69427e |
| 13-Apr-2022 |
Ilia Diachkov <iliya.diyachkov@intel.com> |
[SPIR-V](3/6) Add MC layer, object file support, and InstPrinter
The patch adds SPIRV-specific MC layer implementation, SPIRV object file support and SPIRVInstPrinter.
Differential Revision: https:
[SPIR-V](3/6) Add MC layer, object file support, and InstPrinter
The patch adds SPIRV-specific MC layer implementation, SPIRV object file support and SPIRVInstPrinter.
Differential Revision: https://reviews.llvm.org/D116462
Authors: Aleksandr Bezzubikov, Lewis Crawford, Ilia Diachkov, Michal Paszkowski, Andrey Tretyakov, Konrad Trifunovic
Co-authored-by: Aleksandr Bezzubikov <zuban32s@gmail.com> Co-authored-by: Ilia Diachkov <iliya.diyachkov@intel.com> Co-authored-by: Michal Paszkowski <michal.paszkowski@outlook.com> Co-authored-by: Andrey Tretyakov <andrey1.tretyakov@intel.com> Co-authored-by: Konrad Trifunovic <konrad.trifunovic@intel.com>
show more ...
|