[PATCH] D43285: [CodeGen] Refactor AppleAccelTable

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 14 05:17:41 PST 2018


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

This commit separates the abstract accelerator table data structure
from the code for writing out an on-disk representation of a specific
accelerator table format. The idea is that former (now called
AccelTable<T>) can be reused for the DWARF v5 accelerator tables
as-is, without any further customizations.

Some bits of the emission code (now living in the EmissionContext class)
can be reused for DWARF v5 as well, but the subtle differences in the
layout of various subtables mean the sharing is not always possible.
(Also, the individual emit*** functions are fairly simple so there's a
tradeoff between making a bigger general-purpose function, and two
smaller targeted functions.)

Another advantage of this setup is that more of the serialization logic
can be hidden in the .cpp file -- I have moved declarations of the
header and all the emission functions there.


Repository:
  rL LLVM

https://reviews.llvm.org/D43285

Files:
  include/llvm/CodeGen/AccelTable.h
  lib/CodeGen/AsmPrinter/AccelTable.cpp
  lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  lib/CodeGen/AsmPrinter/DwarfDebug.h
  tools/dsymutil/DwarfLinker.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43285.134202.patch
Type: text/x-patch
Size: 40681 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180214/555eef30/attachment.bin>


More information about the llvm-commits mailing list