[PATCH] D49493: [DebugInfo] Reduce debug_str_offsets section size

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 20 09:12:46 PDT 2018


labath updated this revision to Diff 156511.
labath marked 5 inline comments as done.
labath added a comment.

- Rebase on top of https://reviews.llvm.org/D49542

- Make the API more explicit. Of the options proposed by David, I chose to make the string pool api have two methods (getEntry/getIndexedEntry), and also I've stashed a bit into DwarfStringPoolEntryRef to store the original mode in which the reference was obtained. Now it will assert if someone obtains a non-indexed reference, but then later ask for it's index.

  Emitting the indexes does not seem feasible, as we currently have code which assumes they are known statically (so it can compute the smallest DW_FORM_strxN in which they fit).

  Making the assignment of indexes automatical would be possible, but it seemed like a pessimization that is not worth it. We currently call get(Indexed)Entry in three places and in each of them it is quite obvious how will the resulting string be used.


Repository:
  rL LLVM

https://reviews.llvm.org/D49493

Files:
  include/llvm/CodeGen/DwarfStringPoolEntry.h
  lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  lib/CodeGen/AsmPrinter/DwarfFile.cpp
  lib/CodeGen/AsmPrinter/DwarfStringPool.cpp
  lib/CodeGen/AsmPrinter/DwarfStringPool.h
  lib/CodeGen/AsmPrinter/DwarfUnit.cpp
  test/DebugInfo/X86/string-offsets-table-order.ll
  test/DebugInfo/X86/string-offsets-table.ll
  tools/dsymutil/NonRelocatableStringpool.cpp
  unittests/CodeGen/DIEHashTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49493.156511.patch
Type: text/x-patch
Size: 17864 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180720/26bdfa94/attachment.bin>


More information about the llvm-commits mailing list