This is an archive of the discontinued LLVM Phabricator instance.

[AccelTable] Provide DWARF5AccelTableStaticData for dsymutil.
ClosedPublic

Authored by JDevlieghere on Jul 9 2018, 2:48 PM.

Details

Summary

For dsymutil we want to store offsets in the accelerator table entries
rather than DIE pointers. In addition, we need a way to communicate
which CU a DIE belongs to. This patch provides support for both of these
issues. It supersedes r336529 which will be reverted in favor of this.

Diff Detail

Event Timeline

JDevlieghere created this revision.Jul 9 2018, 2:48 PM
  • Add comment motivating template type and callback.

Minor drive-by comment.

llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp
573

I'm guessing this wants llvm:: on it, same as the other overload.

JDevlieghere marked an inline comment as done.
  • Extend interface
  • Address Paul's comment
labath accepted this revision.Jul 16 2018, 3:08 AM

This looks good to me. There are some different tradeoffs we could make (speed/templates vs. code size/virtualization), but I don't have an opinion on that, so if noone else does either, I guess this is fine.

llvm/include/llvm/CodeGen/AccelTable.h
319

If we wanted to optimize things, this could be an llvm::function_ref.

This revision is now accepted and ready to land.Jul 16 2018, 3:08 AM

This looks good to me. There are some different tradeoffs we could make (speed/templates vs. code size/virtualization), but I don't have an opinion on that, so if noone else does either, I guess this is fine.

It seemed reasonable to pick the same trade-offs as we did for the Apple-style accel tables. The motivation then was that we didn't want to pay for a virtual call for every entry in the list.

This revision was automatically updated to reflect the committed changes.