[PATCH] D135267: [DWARF] Share across CUs only when order free
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 11 08:53:41 PDT 2022
dblaikie added a comment.
In D135267#3842862 <https://reviews.llvm.org/D135267#3842862>, @DianQK wrote:
> There seems to be a lot of complexity to consider here, would adding an option to control `DINode` can be shareable be a good suggestion?
> Pseudo-code:
>
> bool DwarfUnit::isShareableAcrossCUs(const DINode *D) const {
> ...
> return ((isa<DIType>(D) && !option("disable-die-share-across-cus"))||
> (isa<DISubprogram>(D) && !cast<DISubprogram>(D)->isDefinition())) &&
> !DD->generateTypeUnits();
> }
I'm not ready to understand what solutions might be appropriate as I'm still trying to understand the problem and why it arises for Swift but not C++ - sorry I haven't had enough time to try to get the context clearly in my head.
I don't have a Swift compiler, and don't really know Swift (so I'm not sure what `Foo: Hashable` means - in C++ that would be derivation, and `Hashable` wouldn't have any reference to `Foo` (only the other way around, `Foo` would reference `Hashable`) - could you include the LLVM IR for this small example so I could take a look?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135267/new/
https://reviews.llvm.org/D135267
More information about the llvm-commits
mailing list