[all-commits] [llvm/llvm-project] c9cbe6: [dsymutil] Track uncloned references in the DIEInfo.
Jonas Devlieghere via All-commits
all-commits at lists.llvm.org
Tue Dec 20 12:53:37 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c9cbe6937b1fe797f805648216257ae88bde4ad7
https://github.com/llvm/llvm-project/commit/c9cbe6937b1fe797f805648216257ae88bde4ad7
Author: Jonas Devlieghere <jonas at devlieghere.com>
Date: 2022-12-20 (Tue, 20 Dec 2022)
Changed paths:
M llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h
M llvm/lib/DWARFLinker/DWARFLinker.cpp
M llvm/lib/DWARFLinker/DWARFLinkerCompileUnit.cpp
A llvm/test/tools/dsymutil/odr-two-units-in-single-file.test
Log Message:
-----------
[dsymutil] Track uncloned references in the DIEInfo.
To improve deduplication across CUs within a single object file,
2b747241a6a0 changed the way we track ODR canonical candidates. The
result is that some assumptions no longer hold. Because of the
aforementioned change, the following condition
assert(Ref > InputDIE.getOffset());
in DWARFLinker::DIECloner::cloneDieReferenceAttribute is no longer an
invariant. An example of a situation where this assertion no longer
holds is when we have decided to replace a backward reference in the
current CU with a forward reference in a subsequent CU. The ODR
canonical DIE hasn't been emitted yet, but the references DIE has an
offset smaller than the current DIE. The assertion is only true if the
referenced DIE was the ODR canonical DIE, which is no longer guaranteed
to be part of the same CU.
Big thanks to Alexey for putting a test together.
Differential revision: https://reviews.llvm.org/D138176
Commit: 1b79bed8f53231144ad6e14f8cc3e8673c7fb469
https://github.com/llvm/llvm-project/commit/1b79bed8f53231144ad6e14f8cc3e8673c7fb469
Author: Jonas Devlieghere <jonas at devlieghere.com>
Date: 2022-12-20 (Tue, 20 Dec 2022)
Changed paths:
M llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h
M llvm/lib/DWARFLinker/DWARFLinker.cpp
M llvm/lib/DWARFLinker/DWARFLinkerCompileUnit.cpp
Log Message:
-----------
[dsymutil] Verify the keep chain when asserts are enabled
Verify that every DIE that's marked as kept, has a parent that's kept as
well. This invariant should always hold and is easy to verify when
asserts are enabled.
Differential revision: https://reviews.llvm.org/D140227
Compare: https://github.com/llvm/llvm-project/compare/66ba7c32add0...1b79bed8f532
More information about the All-commits
mailing list