[PATCH] D42246: [NFC] Generalize DwarfAccelTable

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 08:59:17 PST 2018


JDevlieghere created this revision.
JDevlieghere added reviewers: aprantl, friss, echristo, dblaikie, labath.

This patch is an effort to make the DwarfAccelTable more generic so they
can be reused by the dsymutil implementation, where we need to support
different atoms for LLDB:

  eAtomTypeTypeFlags = 5u,    // Flags from enum TypeFlags
  eAtomTypeQualNameHash = 6u  // A 32 bit hash of the full qualified name

Similar to some patches from Fred in the past, my goal was to make the
DwarfAccelTable generic and the emitted data is actually derived from
the list of atoms passed to its constructor. For this purpose I have
added a callback function to the interface. This callback function can
is used to generate a value for a combination of row (HashDataContents)
and column (Atom).

I believe this approach provides the best trade-off between making the
table more generic while still building on the current, proven
implementation.

As discussed on the mailing list
(http://lists.llvm.org/pipermail/llvm-dev/2018-January/120499.html) we
want to bring DWARFv5 accelerator tables to LLVM. The goal is to share
as much logic as possible between the two implementation. With that in
mind, I believe it's beneficial to have llvm-dsymutil use the current
implementation, as to ensure that the future design supports this use
case down the line.

>From the emitted code point of view, the patch is actually NFC, we rely
on the existing tests to prove that the patch doesn't break anything.


Repository:
  rL LLVM

https://reviews.llvm.org/D42246

Files:
  lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp
  lib/CodeGen/AsmPrinter/DwarfAccelTable.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42246.130426.patch
Type: text/x-patch
Size: 5984 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180118/6599a1c8/attachment.bin>


More information about the llvm-commits mailing list