[PATCH] D17321: DIEData, DIEWriter: introduce and begin migration.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 19 12:31:51 PST 2016


On Wed, Feb 17, 2016 at 10:35:43PM +0000, David Blaikie wrote:
> dblaikie added a comment.
> 
> The hashing stuff does seem a bit worrying - not sure how that'll end up looking.

I looked into this a little more and it looks like the result of
DIEHash is only used to compute a value for DW_AT_dwo_id when split
DWARF is enabled. Somewhat surprisingly we do not use DIEHash to
compute signatures for type units (and in fact appear to be computing
them incorrectly, see DwarfDebug::makeTypeSignature). Since the page at
https://gcc.gnu.org/wiki/DebugFission does not specify how the hash is to be
computed, could we maybe do something simpler (e.g. MD5 hash the DIE bytes
themselves) and avoid needing to use something like the DWARF type hashing
algorithm for this?

If we ever needed to compute signatures for type units correctly, I reckon
we could start implementing something along the lines of what I started
in this patch (and since type units don't include special members etc.,
the implementation would be simpler than what we would need in order to
implement emission for types in a compile unit DIE, I believe).

But until that happens, I'm inclined to replace my hashing code with something
that hashes DIEHash bytes.

Thanks,
-- 
Peter


More information about the llvm-commits mailing list