|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, 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, llvmorg-20-init, 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, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, 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, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
9e6d1f4b |
| 17-Jul-2022 |
Kazu Hirata <[email protected]> |
[CodeGen] Qualify auto variables in for loops (NFC)
|
| #
becbbb7e |
| 27-Jun-2022 |
Patrick Walton <[email protected]> |
Round up zero-sized symbols to 1 byte in `.debug_aranges` (without breaking other logic).
This commit modifies the AsmPrinter to avoid emitting any zero-sized symbols to the .debug_aranges table, by
Round up zero-sized symbols to 1 byte in `.debug_aranges` (without breaking other logic).
This commit modifies the AsmPrinter to avoid emitting any zero-sized symbols to the .debug_aranges table, by rounding their size up to 1. Entries with zero length violate the DWARF 5 spec, which states:
> Each descriptor is a triple consisting of a segment selector, the beginning > address within that segment of a range of text or data covered by some entry > owned by the corresponding compilation unit, followed by the non-zero length > of that range.
In practice, these zero-sized entries produce annoying warnings in lld and cause GNU binutils to truncate the table when parsing it.
Other parts of LLVM, such as DWARFDebugARanges in the DebugInfo module (specifically the appendRange method), already avoid emitting zero-sized symbols to .debug_aranges, but not comprehensively in the AsmPrinter. In fact, the AsmPrinter does try to avoid emitting such zero-sized symbols when labels aren't involved, but doesn't when the symbol to emitted is a difference of two labels; this patch extends that logic to handle the case in which the symbol is defined via labels.
Furthermore, this patch fixes a bug in which `available_externally` symbols would cause unpredictable values to be emitted into the `.debug_aranges` table under certain circumstances. In practice I don't believe that this caused issues up until now, but the root cause of this bug--an invalid DenseMap lookup--triggered failures in Chromium when combined with an earlier version of this patch. Therefore, this patch fixes that bug too.
This is a revised version of diff D126257, which was reverted due to breaking tests. The now-reverted version of this patch didn't distinguish between symbols that didn't have their size reported to the DwarfDebug handler and those that had their size reported to be zero. This new version of the patch instead restricts the special handling only to the symbols whose size is definitively known to be zero.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D126835
show more ...
|
|
Revision tags: llvmorg-14.0.6 |
|
| #
0ce33c29 |
| 14-Jun-2022 |
Paul Robinson <[email protected]> |
[PS5] Default to 'sce' debugger tuning
|
| #
adf4142f |
| 11-Jun-2022 |
Fangrui Song <[email protected]> |
[MC] De-capitalize SwitchSection. NFC
Add SwitchSection to return switchSection. The API will be removed soon.
|
|
Revision tags: llvmorg-14.0.5 |
|
| #
15d82c62 |
| 07-Jun-2022 |
Fangrui Song <[email protected]> |
[MC] De-capitalize MCStreamer functions
Follow-up to c031378ce01b8485ba0ef486654bc9393c4ac024 . The class is mostly consistent now.
|
| #
86caa037 |
| 31-May-2022 |
Bjorn Pettersson <[email protected]> |
Revert "Round up zero-sized symbols to 1 byte in `.debug_aranges`."
This reverts commit 256a52d9aac8a9e98fbfd6a3d91090bf127cef7d (and also the follow-up commit 38eb4fe74b3843ab0d7fc1e that moved a t
Revert "Round up zero-sized symbols to 1 byte in `.debug_aranges`."
This reverts commit 256a52d9aac8a9e98fbfd6a3d91090bf127cef7d (and also the follow-up commit 38eb4fe74b3843ab0d7fc1e that moved a test case to a different directory).
As discussed in https://reviews.llvm.org/D126257 there is a suspicion that something was wrong with this commit as text section range was shortened to 1 byte rather than rounded up as shown in the llvm/test/DebugInfo/X86/dwarf-aranges.ll test case.
show more ...
|
| #
256a52d9 |
| 25-May-2022 |
Patrick Walton <[email protected]> |
Round up zero-sized symbols to 1 byte in `.debug_aranges`.
This commit modifies the AsmPrinter to avoid emitting any zero-sized symbols to the .debug_aranges table, by rounding their size up to 1. E
Round up zero-sized symbols to 1 byte in `.debug_aranges`.
This commit modifies the AsmPrinter to avoid emitting any zero-sized symbols to the .debug_aranges table, by rounding their size up to 1. Entries with zero length violate the DWARF 5 spec, which states:
> Each descriptor is a triple consisting of a segment selector, the beginning > address within that segment of a range of text or data covered by some entry > owned by the corresponding compilation unit, followed by the non-zero length > of that range.
In practice, these zero-sized entries produce annoying warnings in lld and cause GNU binutils to truncate the table when parsing it.
Other parts of LLVM, such as DWARFDebugARanges in the DebugInfo module (specifically the appendRange method), already avoid emitting zero-sized symbols to .debug_aranges, but not comprehensively in the AsmPrinter. In fact, the AsmPrinter does try to avoid emitting such zero-sized symbols when labels aren't involved, but doesn't when the symbol to emitted is a difference of two labels; this patch extends that logic to handle the case in which the symbol is defined via labels.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D126257
show more ...
|
|
Revision tags: llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1 |
|
| #
330268ba |
| 04-Apr-2022 |
Argyrios Kyrtzidis <[email protected]> |
[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 ...
|
| #
a5032b26 |
| 25-Mar-2022 |
David Blaikie <[email protected]> |
DebugInfo: Don't allow type units to references types in the CU
We could only do this in limited ways (since we emit the TUs first, we can't use ref_addr (& we can't use that in Split DWARF either)
DebugInfo: Don't allow type units to references types in the CU
We could only do this in limited ways (since we emit the TUs first, we can't use ref_addr (& we can't use that in Split DWARF either) - so we had to synthesize declarations into the TUs) and they were ambiguous in some cases (if the CU type had internal linkage, parsing the TU would require knowing which CU was referencing the TU to know which type the declaration was for, which seems not-ideal). So to avoid all that, let's just not reference types defined in the CU from TUs - instead moving the TU type into the CU (recursively).
This does increase debug info size (by pulling more things out of type units, into the compile unit) - about 2% of uncompressed dwp file size for clang -O0 -g -gsplit-dwarf. (5% .debug_info.dwo section size increase in the .dwp)
show more ...
|
|
Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3 |
|
| #
ed98c1b3 |
| 09-Mar-2022 |
serge-sans-paille <[email protected]> |
Cleanup includes: DebugInfo & CodeGen
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D121332
|
| #
7b85f0f3 |
| 02-Mar-2022 |
Paul Robinson <[email protected]> |
[PS4] isPS4 and isPS4CPU are not meaningfully different
|
|
Revision tags: llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init |
|
| #
f69f2339 |
| 01-Feb-2022 |
David Blaikie <[email protected]> |
Revert "DebugInfo: Don't put types in type units if they reference internal linkage types"
This reverts commit ab4756338c5b2216d52d9152b2f7e65f233c4dac.
Breaks some cases, including this:
namespac
Revert "DebugInfo: Don't put types in type units if they reference internal linkage types"
This reverts commit ab4756338c5b2216d52d9152b2f7e65f233c4dac.
Breaks some cases, including this:
namespace { template <typename> struct a {}; } // namespace class c { c(); }; class b { b(); a<c> ax; }; b::b() {} c::c() {}
By producing a reference to a type unit for "c" but not producing the type unit.
show more ...
|
| #
ab475633 |
| 22-Jan-2022 |
David Blaikie <[email protected]> |
DebugInfo: Don't put types in type units if they reference internal linkage types
Doing this causes a declaration of the internal linkage (anonymous namespace) type to be emitted in the type unit, w
DebugInfo: Don't put types in type units if they reference internal linkage types
Doing this causes a declaration of the internal linkage (anonymous namespace) type to be emitted in the type unit, which would then be ambiguous as to which internal linkage definition it refers to (since the name is only valid internally).
It's possible these internal linkage types could be resolved relative to the unit the TU is referred to from - but that doesn't seem ideal, and there's no reason to put the type in a type unit since it can only be defined in one CU anyway (since otherwise it'd be an ODR violation) & so avoiding the type unit should be a smaller DWARF encoding anyway.
This also addresses an issue with Simplified Template Names where the template parameter could not be rebuilt from the declaration emitted into the TU (specifically for an enum non-type template parameter, where looking up the enumerators is necessary to rebuild the full template name)
show more ...
|
|
Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3 |
|
| #
65fbe38f |
| 16-Jan-2022 |
Bjorn Pettersson <[email protected]> |
[DwarfDebug] Restore code that make comments stay aligned in DwarfDebug::emitDebugLocEntry
Commit 2bddab25dba8d4b0 removed a piece of code from DwarfDebug::emitDebugLocEntry that according to code c
[DwarfDebug] Restore code that make comments stay aligned in DwarfDebug::emitDebugLocEntry
Commit 2bddab25dba8d4b0 removed a piece of code from DwarfDebug::emitDebugLocEntry that according to code comments "Make sure comments stay aligned".
This patch restores that piece of code, together with the addition of some extra checks in an existing lit test to work as a regression test. Without this patch we incorrectly get .byte 159 # 0 instead of .byte 159 # DW_OP_stack_value
Differential Revision: https://reviews.llvm.org/D117441
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc2 |
|
| #
2bddab25 |
| 25-Dec-2021 |
David Blaikie <[email protected]> |
DebugInfo: Don't hash DIE offsets before they're computed
Instead of hashing DIE offsets, hash DIE references the same as they would be when used outside of a loclist - that is, deep hash the type o
DebugInfo: Don't hash DIE offsets before they're computed
Instead of hashing DIE offsets, hash DIE references the same as they would be when used outside of a loclist - that is, deep hash the type on first use, and hash the numbering on subsequent uses.
This does produce different hashes for different type references, where it did not before (because we were hashing zero all the time - so it didn't matter what type was referenced, the hash would be identical).
This also allows us to enforce that the DIE offset (& size) is not queried before it is used (which came up while investigating another bug recently).
show more ...
|
| #
b05df028 |
| 24-Dec-2021 |
David Blaikie <[email protected]> |
Revert "[DWARF] Fix PR51087 Extraneous enum record in DWARF with type units"
Causes invalid debug_gnu_pubnames (& I think non-gnu pubnames too) - visible as 0 values for the offset in gnu pubnames.
Revert "[DWARF] Fix PR51087 Extraneous enum record in DWARF with type units"
Causes invalid debug_gnu_pubnames (& I think non-gnu pubnames too) - visible as 0 values for the offset in gnu pubnames. More details on the original review in D115325.
This reverts commit 78d15a112cbd545fbb6e1aa37c221ef5aeffb3f2. This reverts commit 54586582d3e17c0bba76258d2930486a6dfaaf2a.
show more ...
|
| #
81378f7e |
| 23-Dec-2021 |
Kristina Bessonova <[email protected]> |
Revert "[DwarfDebug] Support emitting function-local declaration for a lexical block" & dependent patches
Try to revert D113741 once again.
This also reverts 0ac75e82fff93a80ca401d3db3541e8d1d9098f
Revert "[DwarfDebug] Support emitting function-local declaration for a lexical block" & dependent patches
Try to revert D113741 once again.
This also reverts 0ac75e82fff93a80ca401d3db3541e8d1d9098f9 (D114705) as it causes LLDB's lldb-api.lang/cpp/nsimport.TestCppNsImport.py test failure w/o D113741.
This reverts commit f9607d45f399e2afc39ec16222ea68b4e0831564.
Differential Revision: https://reviews.llvm.org/D116225
show more ...
|
| #
f9607d45 |
| 23-Dec-2021 |
Muhammad Omair Javaid <[email protected]> |
Revert "Revert "[DwarfDebug] Support emitting function-local declaration for a lexical block" & dependent patches"
This has broke following LLDB buildbots:
https://lab.llvm.org/buildbot/#/builders/
Revert "Revert "[DwarfDebug] Support emitting function-local declaration for a lexical block" & dependent patches"
This has broke following LLDB buildbots:
https://lab.llvm.org/buildbot/#/builders/17/builds/14984 https://lab.llvm.org/buildbot/#/builders/96/builds/15928 https://lab.llvm.org/buildbot/#/builders/68/builds/23600
This reverts commit 62a6b9e9ab3eb778111e90a34fee1e6a7c64db8a.
show more ...
|
| #
62a6b9e9 |
| 22-Dec-2021 |
David Blaikie <[email protected]> |
Revert "[DwarfDebug] Support emitting function-local declaration for a lexical block" & dependent patches
This patch causes invalid DWARF to be generated in some cases of LTO + Split DWARF - follow-
Revert "[DwarfDebug] Support emitting function-local declaration for a lexical block" & dependent patches
This patch causes invalid DWARF to be generated in some cases of LTO + Split DWARF - follow-up on the original review thread (D113741) contains further detail and test cases.
This reverts commit 75b622a7959479ccdb758ebe0973061b7b4fcacd. This reverts commit b6ccca217c35a95b8c2a337a7801b37cb23dbae2. This reverts commit 514d37441918dd04a2cd4f35c08959d7c3ff096d.
show more ...
|
| #
78d15a11 |
| 17-Dec-2021 |
OCHyams <[email protected]> |
[DWARF] Fix PR51087 Extraneous enum record in DWARF with type units
Fixes https://llvm.org/PR51087: Extraneous enum record in DWARF with type units.
As explained in PR51087 we sometimes get skeleto
[DWARF] Fix PR51087 Extraneous enum record in DWARF with type units
Fixes https://llvm.org/PR51087: Extraneous enum record in DWARF with type units.
As explained in PR51087 we sometimes get skeleton DIEs for enums in a Dwarf Compile Unit (CU) that are not referenced from any CU and are already described by a type unit.
Types for enums are emitted whether used or not, all together before most types in the CU. Mechanically, the extraneous CU records are generated because the enum types are generated with a call to CU->getOrCreateTypeDIE. This function will recursively get-or-create the parent DIE (in the CU) and the type unit for each. We don't need the CU-side DIEs if the type units are sucesfully emitted. Fix by only emitting the type units for enums if possible, falling back to a call to getOrCreateTypeDIE if not. Do the same for retained types.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D115325
show more ...
|
| #
75b622a7 |
| 04-Dec-2021 |
Kristina Bessonova <[email protected]> |
Reland [DwarfDebug] Support emitting function-local declaration for a lexical block
This is another attempt to make function-local declarations (like static variables, structs/classes and other) be
Reland [DwarfDebug] Support emitting function-local declaration for a lexical block
This is another attempt to make function-local declarations (like static variables, structs/classes and other) be correctly emitted within a lexical (bracketed) block.
Fixes https://bugs.llvm.org/show_bug.cgi?id=19238.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D113741
show more ...
|
| #
0ac75e82 |
| 04-Dec-2021 |
Kristina Bessonova <[email protected]> |
Reland [DwarfDebug] Move emission of global vars, types and imports to endModule()
This patch proposes to move emission of global variables, types, imported entities, etc from DwarfDebug::beginModul
Reland [DwarfDebug] Move emission of global vars, types and imports to endModule()
This patch proposes to move emission of global variables, types, imported entities, etc from DwarfDebug::beginModule() to DwarfDebug::endModule(). Effectively, this changes nothing but the order of debug entities which will be as follows: * subprograms (including related context, local variables/labels, local imported entities; related types can be created as a part of the emission of local entities of an abstract subprogram); * global variables (including related context and types); * retained types and enums; * non-local-scoped imported entities; * basic types; * other types left (as a part of local variables attributes emission).
Note that the order of emitted compile units may also be changed as now we emit units that contain subprograms first and then all other non-empty units.
The motivation behind this change is the following: (1) DwarfDebug::beginModule() is run at the very beginning of backend's pipeline, from this time IR can be significantly changed by target-specific passes. If it happens for debug metadata of global entities, those changes will not be reflected in the emitted DWARF. (2) imported subprogram names should refer to an abstract subprogram if it exists, but it isn't known in DwarfDebug::beginModule() (it's possible to make some guesses based on location info, but it's not quite reliable); (3) aforementioned entities if they are scoped within a bracketed block (subject of D113741) couldn't be emitted in DwarfDebug::beginModule() (they need parent emitted first). Another problem is if to try to gather some information about local entities and defer their emission (till subprogram's processing or DwarfDebug::endModule()) all the gathered details might be irrelevant / invalid by the time the entities are being emitted (because of (1)).
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D114705
show more ...
|
| #
a9616048 |
| 04-Dec-2021 |
Kristina Bessonova <[email protected]> |
Revert "[DwarfDebug] Support emitting function-local declaration for a lexical block"
This reverts commits * ee691970a9a85470948ada623c31f0ab8773617c (D113741), * 79d3132998b2828be8f7d2ec411f91fb11b
Revert "[DwarfDebug] Support emitting function-local declaration for a lexical block"
This reverts commits * ee691970a9a85470948ada623c31f0ab8773617c (D113741), * 79d3132998b2828be8f7d2ec411f91fb11b3e01f (D114705)
due to lldb and dexter test failures.
show more ...
|
| #
ee691970 |
| 04-Dec-2021 |
Kristina Bessonova <[email protected]> |
[DwarfDebug] Support emitting function-local declaration for a lexical block
This is another attempt to make function-local declarations (like static variables, structs/classes and other) be correct
[DwarfDebug] Support emitting function-local declaration for a lexical block
This is another attempt to make function-local declarations (like static variables, structs/classes and other) be correctly emitted within a lexical (bracketed) block.
Fixes https://bugs.llvm.org/show_bug.cgi?id=19238.
Differential Revision: https://reviews.llvm.org/D113741
show more ...
|
| #
79d31329 |
| 04-Dec-2021 |
Kristina Bessonova <[email protected]> |
[DwarfDebug] Move emission of global vars, types and imports to endModule()
This patch proposes to move emission of global variables, types, imported entities, etc from DwarfDebug::beginModule() to
[DwarfDebug] Move emission of global vars, types and imports to endModule()
This patch proposes to move emission of global variables, types, imported entities, etc from DwarfDebug::beginModule() to DwarfDebug::endModule(). Effectively, this changes nothing but the order of debug entities which will be as follows: * subprograms (including related context, local variables/labels, local imported entities; related types can be created as a part of the emission of local entities of an abstract subprogram); * global variables (including related context and types); * retained types and enums; * non-local-scoped imported entities; * basic types; * other types left (as a part of local variables attributes emission).
Note that the order of emitted compile units may also be changed as now we emit units that contain subprograms first and then all other non-empty units.
The motivation behind this change is the following: (1) DwarfDebug::beginModule() is run at the very beginning of backend's pipeline, from this time IR can be significantly changed by target-specific passes. If it happens for debug metadata of global entities, those changes will not be reflected in the emitted DWARF. (2) imported subprogram names should refer to an abstract subprogram if it exists, but it isn't known in DwarfDebug::beginModule() (it's possible to make some guesses based on location info, but it's not quite reliable); (3) aforementioned entities if they are scoped within a bracketed block (subject of D113741) couldn't be emitted in DwarfDebug::beginModule() (they need parent emitted first). Another problem is if to try to gather some information about local entities and defer their emission (till subprogram's processing or DwarfDebug::endModule()) all the gathered details might be irrelevant / invalid by the time the entities are being emitted (because of (1)).
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D114705
show more ...
|