SuccessChanges

Summary

  1. [DebugInfo] Fix methods of AsmPrinter to emit values corresponding to the DWARF format (1/19). (details)
  2. [DebugInfo] Fix DIE value emitters to be compatible with DWARF64 (2/19). (details)
  3. [DebugInfo] Add new emitting methods for values which depend on the DWARF format (3/19). (details)
  4. [DebugInfo] Add the -dwarf64 switch to llc and other internal tools (4/19). (details)
  5. [DebugInfo] Fix emitting DWARF64 compilation units (5/19). (details)
  6. [DebugInfo] Use a common method to determine a suitable form for section offsts (6/19). (details)
  7. [DebugInfo] Fix emitting the DW_AT_location attribute for 64-bit DWARFv3 (7/19). (details)
  8. [DebugInfo] Fix emitting DWARF64 .debug_str_offsets sections (8/19). (details)
  9. [DebugInfo] Fix emitting DWARF64 DWO compilation units and string offset tables (9/19). (details)
  10. [DebugInfo] Fix emitting DWARF64 type units (10/19). (details)
  11. [DebugInfo] Fix emitting DWARF64 .debug_aranges sections (11/19). (details)
  12. [DebugInfo] Fix emitting pre-v5 name lookup tables in the DWARF64 format (12/19). (details)
  13. [DebugInfo] Fix emitting DWARF64 .debug_rnglists sections (13/19). (details)
  14. [DebugInfo] Fix emitting DWARF64 .debug_loclists sections (14/19). (details)
  15. [DebugInfo] Fix emitting DWARF64 .debug_addr sections (15/19). (details)
  16. [DebugInfo] Fix emitting DWARF64 .debug_names sections (16/19). (details)
  17. [DebugInfo] Fix emitting DWARF64 .debug_macro[.dwo] sections (17/19). (details)
  18. [DebugInfo] Make the offset of string pool entries 64-bit (18/19). (details)
  19. [DebugInfo] Make offsets of dwarf units 64-bit (19/19). (details)
  20. [BinaryFormat/MachO] Add a missing constant. (details)
  21. [llvm-readobj] [ARMWinEH] Print ARM64 packed unwind info (details)
  22. [LLD] Allow configuring default ld.lld backend (details)
  23. [Windows][Polly] Disable LLVMPolly module for all compilers on Windows (details)
Commit 380e746bcca87baa5c746854b44d6a5cea6f7bde by ikudrin
[DebugInfo] Fix methods of AsmPrinter to emit values corresponding to the DWARF format (1/19).

These methods are used to emit values which are 32-bit in DWARF32 and
64-bit in DWARF64. The patch fixes them so that they choose the length
automatically, depending on the DWARF format set in the Context.

Differential Revision: https://reviews.llvm.org/D87008
The file was modifiedllvm/unittests/CodeGen/CMakeLists.txt
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
The file was addedllvm/unittests/CodeGen/AsmPrinterDwarfTest.cpp
The file was addedllvm/unittests/CodeGen/TestAsmPrinter.cpp
The file was modifiedllvm/include/llvm/CodeGen/AsmPrinter.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
The file was addedllvm/unittests/CodeGen/TestAsmPrinter.h
Commit a8058c6f8d1d3a360986f05b74f548995b384fcd by ikudrin
[DebugInfo] Fix DIE value emitters to be compatible with DWARF64 (2/19).

DW_FORM_sec_offset and DW_FORM_strp imply values of different sizes with
DWARF32 and DWARF64. The patch fixes DIE value classes to use correct
sizes when emitting their values. For DIELocList it ensures that the
requested DWARF form matches the current DWARF format because that class
uses a method that selects the size automatically.

Differential Revision: https://reviews.llvm.org/D87009
The file was addedllvm/unittests/CodeGen/DIETest.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DIE.cpp
The file was modifiedllvm/unittests/CodeGen/CMakeLists.txt
Commit c3c501f5d79130fe9bbe4f6ca689f2d83f92373e by ikudrin
[DebugInfo] Add new emitting methods for values which depend on the DWARF format (3/19).

These methods are going to be used in subsequent patches.

Differential Revision: https://reviews.llvm.org/D87010
The file was modifiedllvm/include/llvm/CodeGen/AsmPrinter.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
The file was modifiedllvm/unittests/CodeGen/AsmPrinterDwarfTest.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
Commit 982b31fad2983eef08dbbddb2d58c635bdf6cf08 by ikudrin
[DebugInfo] Add the -dwarf64 switch to llc and other internal tools (4/19).

The patch adds a switch to enable emitting debug info in the 64-bit
DWARF format. Most emitter for sections will be updated in the subsequent
patches, whereas for .debug_line and .debug_frame the emitters are in
the MC library, which is already updated.

For now, the switch is enabled only for 64-bit ELF targets.

Differential Revision: https://reviews.llvm.org/D87011
The file was addedllvm/test/DebugInfo/X86/dwarf64-support.ll
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
The file was addedllvm/test/DebugInfo/X86/debug-frame-dwarf64.ll
The file was addedllvm/test/DebugInfo/X86/debug-line-dwarf64.ll
Commit 5dd1c59188988a030dfc80bd20729534f3a41b46 by ikudrin
[DebugInfo] Fix emitting DWARF64 compilation units (5/19).

The patch also adds a method to choose an appropriate DWARF form
to represent section offsets according to the version and the format
of producing debug info.

Differential Revision: https://reviews.llvm.org/D87014
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DIE.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
The file was modifiedllvm/unittests/CodeGen/DIETest.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
The file was addedllvm/test/DebugInfo/X86/debug-info-dwarf64.ll
Commit cae7c1eb781d591aa3d16ec6bc3a8fe1ace6e4ef by ikudrin
[DebugInfo] Use a common method to determine a suitable form for section offsts (6/19).

This is mostly an NFC patch because the involved methods are used when
emitting DWO files, which is incompatible with DWARFv3, or for platforms
where DWARF64 is not supported yet.

Differential Revision: https://reviews.llvm.org/D87015
The file was modifiedllvm/unittests/CodeGen/DIETest.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DIE.cpp
Commit 26f1f18831342e9c5e137e68d067d7383d72f30d by ikudrin
[DebugInfo] Fix emitting the DW_AT_location attribute for 64-bit DWARFv3 (7/19).

The patch uses a common method to determine the appropriate form for
the value of the attribute.

Differential Revision: https://reviews.llvm.org/D87016
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
The file was modifiedllvm/test/DebugInfo/X86/DW_AT_location-reference.ll
Commit 383d34c077ae7f845bf751936f59f12598e60b3e by ikudrin
[DebugInfo] Fix emitting DWARF64 .debug_str_offsets sections (8/19).

The patch fixes calculating the size of the table and emitting the unit
length field.

Differential Revision: https://reviews.llvm.org/D87017
The file was addedllvm/test/DebugInfo/X86/debug-str-offsets-dwarf64.ll
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp
Commit 924dc5807690f9ee0a84e407e8cb943511845bf5 by ikudrin
[DebugInfo] Fix emitting DWARF64 DWO compilation units and string offset tables (9/19).

These two fixes are better to go together because llvm-dwarfdump is
unable to dump a table when another one is malformed.

Differential Revision: https://reviews.llvm.org/D87018
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp
The file was addedllvm/test/DebugInfo/X86/debug-str-offsets-dwo-dwarf64.ll
The file was addedllvm/test/DebugInfo/X86/debug-info-dwo-dwarf64.ll
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
Commit 18f23b3ecc6d0cec31c655b7ae9054cf0edf630e by ikudrin
[DebugInfo] Fix emitting DWARF64 type units (10/19).

The patch fixes emitting the offset to the type DIE. All other fields
are already fixed in previous patches.

Differential Revision: https://reviews.llvm.org/D87021
The file was addedllvm/test/DebugInfo/X86/debug-types-dwarf64.ll
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
Commit b118030f3fa68b308d149d7d4303e0623ead0463 by ikudrin
[DebugInfo] Fix emitting DWARF64 .debug_aranges sections (11/19).

The patch fixes calculating the size of the table and emitting
the fields which depend on the DWARF format by using methods that
choose appropriate sizes automatically.

Differential Revision: https://reviews.llvm.org/D87012
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
The file was addedllvm/test/DebugInfo/X86/debug-aranges-dwarf64.ll
Commit 03b09c6b68bbce80bea47db40ad85809d363b260 by ikudrin
[DebugInfo] Fix emitting pre-v5 name lookup tables in the DWARF64 format (12/19).

The transition is done by using methods of AsmPrinter which
automatically emit values in compliance with the selected DWARF format.

Differential Revision: https://reviews.llvm.org/D87013
The file was addedllvm/test/DebugInfo/X86/debug-pubtables-dwarf64.ll
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Commit f9b242fe24f764166f818b3260c0635fc0bef6e9 by ikudrin
[DebugInfo] Fix emitting DWARF64 .debug_rnglists sections (13/19).

The size of the offsets in the table depends on the DWARF format.

Differential Revision: https://reviews.llvm.org/D87019
The file was modifiedllvm/test/DebugInfo/X86/split-dwarf-v5-ranges.ll
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Commit 3158d3dd4b7e5c6e2aff7c81355757d26579f1a3 by ikudrin
[DebugInfo] Fix emitting DWARF64 .debug_loclists sections (14/19).

The size of the offsets in the table depends on the DWARF format.

Differential Revision: https://reviews.llvm.org/D87020
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
The file was modifiedllvm/test/CodeGen/X86/debug-loclists.ll
The file was modifiedllvm/test/CodeGen/X86/debug-loclists-lto.ll
Commit 00ce54689d30fd65c49ebc87a21841e834f2d086 by ikudrin
[DebugInfo] Fix emitting DWARF64 .debug_addr sections (15/19).

The patch fixes emitting the header of the table. The content is
independent of the DWARF format.

Differential Revision: https://reviews.llvm.org/D87022
The file was addedllvm/test/DebugInfo/X86/debug-addr-dwarf64.ll
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AddressPool.cpp
Commit a93dd26d8ced81d7d2e9a239a4cc33aaf0ba7c89 by ikudrin
[DebugInfo] Fix emitting DWARF64 .debug_names sections (16/19).

The patch fixes emitting the unit length field in the header of
the table and offsets to the entry pool. Note that while the patch
changes the common method to emit offsets, in fact, nothing is changed
for Apple accelerator tables, because we do not yet support DWARF64 for
those targets.

Differential Revision: https://reviews.llvm.org/D87023
The file was addedllvm/test/DebugInfo/X86/debug-names-dwarf64.ll
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AccelTable.cpp
Commit 7e1e4e81cbcac6156005a31d90b604714c92298c by ikudrin
[DebugInfo] Fix emitting DWARF64 .debug_macro[.dwo] sections (17/19).

The patch fixes emitting flags and the debug_line_offset field in
the header, as well as the reference to the macro string for
a pre-standard GNU .debug_macro extension.

Differential Revision: https://reviews.llvm.org/D87024
The file was addedllvm/test/DebugInfo/X86/debug-macro-dwarf64.ll
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Commit 8c19ac23bdefceaaf119add8d693e89a6f7d3d81 by ikudrin
[DebugInfo] Make the offset of string pool entries 64-bit (18/19).

The string pool is shared among several units in the case of LTO,
and it potentially can exceed the limit of 4GiB for an extremely
large application. As it is now possible to emit 64-bit debugging
info, the limitation can be removed.

Differential Revision: https://reviews.llvm.org/D87025
The file was modifiedllvm/include/llvm/CodeGen/NonRelocatableStringpool.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfStringPool.h
The file was modifiedllvm/include/llvm/CodeGen/DwarfStringPoolEntry.h
Commit a845ebd6333d95d58bd6ab18c6ff8bb79686c664 by ikudrin
[DebugInfo] Make offsets of dwarf units 64-bit (19/19).

In the case of LTO, several DWARF units can be emitted in one section.
For an extremely large application, they may exceed the limit of 4GiB
for 32-bit offsets. As it is now possible to emit 64-bit debugging info,
the patch enables storing the larger offsets.

Differential Revision: https://reviews.llvm.org/D87026
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DIE.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AccelTable.cpp
The file was modifiedllvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
The file was modifiedllvm/include/llvm/CodeGen/DIE.h
Commit 26c293c23d3b5cf4135fce0b1e61b70d6c4dd930 by ditaliano
[BinaryFormat/MachO] Add a missing constant.

Reference:
https://opensource.apple.com/source/cctools/cctools-949.0.1/include/mach-o/loader.h.auto.html
The file was modifiedllvm/include/llvm/BinaryFormat/MachO.h
Commit 7b416c5e3683d7120e4ce390e669f89b6a72d423 by martin
[llvm-readobj] [ARMWinEH] Print ARM64 packed unwind info

In addition to printing the individual fields, synthesize and
print the corresponding prolog for the unwind info (in reverse
order, to match how it's printed for non-packed unwind info).

Differential Revision: https://reviews.llvm.org/D87370
The file was addedllvm/test/tools/llvm-readobj/COFF/arm64-packed-unwind.s
The file was modifiedllvm/tools/llvm-readobj/ARMWinEHPrinter.h
The file was modifiedllvm/tools/llvm-readobj/ARMWinEHPrinter.cpp
The file was modifiedllvm/include/llvm/Support/ARMWinEH.h
Commit 61e0b2b4c5fbbea01bb40f28ea0222b87166ccdf by martin
[LLD] Allow configuring default ld.lld backend

The motivation for this is ld.lld --help targeting MinGW which
currently prints help for the ELF backend unless -m i386pe{,p} is
added. This confuses build systems that grep through linker help to
find supported flags.

This matches LD from Binutils which always prints help for MinGW
when configured to target it.

After this change, the backend can still be overridden to any
supported ELF/MinGW target by using correct -m <arch>.

Differential Revision: https://reviews.llvm.org/D87418
The file was modifiedlld/CMakeLists.txt
The file was modifiedlld/tools/lld/lld.cpp
Commit e71cda21d71c4c92731ec7fe8345d04395a630b7 by martin
[Windows][Polly] Disable LLVMPolly module for all compilers on Windows

Before this patch, the cmake disabled loadable modules when compiling
with Visual Studio. However, the reason for this is a limitation of the
Windows DLLs, thus this restriction should apply to any compiler for the
Windows platform, such as MinGW, Cygwin, icc, etc.

Differential Revision: https://reviews.llvm.org/D87524
The file was modifiedpolly/cmake/CMakeLists.txt
The file was modifiedpolly/lib/CMakeLists.txt