[PATCH] D140072: [dsymutil] Mark ODR canonical DIEs after processing the whole CU

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 14 17:11:07 PST 2022


JDevlieghere created this revision.
JDevlieghere added reviewers: avl, friss, aprantl.
Herald added a subscriber: hiraditya.
Herald added a project: All.
JDevlieghere requested review of this revision.
Herald added a project: LLVM.

Currently, we've marking DIEs as ODR canonical while looking for DIEs to keep. The current approach works because we do the marking after the parent walk completes, which corresponds to when we're done processing a chain of DIEs. Given the complexity of the wordlist algorithm this is far from obvious when reading the code. I don't believe this actually has to be part of the algorithm that looks for DIEs to keep. In my opinion it would be less fragile and easier to understand if we did the marking of ODR candidates after processing the whole CU. That's what this patch implements.


https://reviews.llvm.org/D140072

Files:
  llvm/include/llvm/DWARFLinker/DWARFLinker.h
  llvm/lib/DWARFLinker/DWARFLinker.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140072.483037.patch
Type: text/x-patch
Size: 4337 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221215/0254ef45/attachment.bin>


More information about the llvm-commits mailing list