[PATCH] D126883: [Debuginfo][DWARF][NFC] Refactor DwarfStringPoolEntry.

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 2 07:54:24 PDT 2022


avl created this revision.
avl added reviewers: aprantl, JDevlieghere, dblaikie, probinson.
Herald added a subscriber: hiraditya.
Herald added a project: All.
avl requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

1. remove DwarfStringPoolEntryRef::isIndexed() since it is not used.
2. Add possibility to keep not only DwarfStringPoolEntry, but also pointer to it.

The DwarfStringPoolEntryRef keeps reference to the string map entry.
String map keeps string data and corresponding DwarfStringPoolEntry
info. Not all string map entries may be included into the result,
and then not all string entries should have DwarfStringPoolEntry
info. Currently StringMap keeps DwarfStringPoolEntry for all entries.
It leads to extra memory usage. This patch allows to keep
DwarfStringPoolEntry info only for entries which really need it.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D126883

Files:
  llvm/include/llvm/CodeGen/DwarfStringPoolEntry.h
  llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp
  llvm/lib/CodeGen/NonRelocatableStringpool.cpp
  llvm/unittests/CodeGen/DIEHashTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126883.433752.patch
Type: text/x-patch
Size: 6397 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220602/ecab3536/attachment.bin>


More information about the llvm-commits mailing list