[PATCH] D42021: [DWARF] v5 implementation of string offsets tables - producer side

Wolfgang Pieb via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 12 17:01:03 PST 2018


wolfgangp created this revision.
wolfgangp added reviewers: aprantl, dblaikie, JDevlieghere.

Generate DWARF v5 string offsets tables and use the DW_FORM_strx? forms to refer to indexed strings. All compile and type units in the compilation share one contribution. There are 3 test cases:

str-offsets-table.ll: Simple test for one unit in non-split and split scenarios.
str-offsets-multiple-cus.ll: Multiple compile units and a type unit
str-offsets-form.ll: Test if we generate DW_FORM_strx2 (in addition to DW_FORM_strx1).

One caveat is that there is no testing for the DW_FORM_strx{3,4} forms. I'm not quite sure how to effect this without a humongous source that uses > 64K strings (for strx3) or > 24M strings (for strx4), other than perhaps a generating script. However, the code that triggers these forms is very simple, so a test for strx2 may be sufficient.


https://reviews.llvm.org/D42021

Files:
  lib/CodeGen/AsmPrinter/DIE.cpp
  lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  lib/CodeGen/AsmPrinter/DwarfDebug.h
  lib/CodeGen/AsmPrinter/DwarfFile.cpp
  lib/CodeGen/AsmPrinter/DwarfFile.h
  lib/CodeGen/AsmPrinter/DwarfStringPool.cpp
  lib/CodeGen/AsmPrinter/DwarfStringPool.h
  lib/CodeGen/AsmPrinter/DwarfUnit.cpp
  lib/CodeGen/AsmPrinter/DwarfUnit.h
  test/DebugInfo/Generic/string-offsets-form.ll
  test/DebugInfo/Generic/string-offsets-multiple-cus.ll
  test/DebugInfo/Generic/string-offsets-table.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42021.129725.patch
Type: text/x-patch
Size: 74383 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180113/7cc13a17/attachment.bin>


More information about the llvm-commits mailing list