[all-commits] [llvm/llvm-project] 77df3b: [Debuginfo][DWARF][NFC] Refactor DwarfStringPoolEn...

avl-llvm via All-commits all-commits at lists.llvm.org
Tue Jun 28 14:25:00 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 77df3be0dee415713cf5c79543f00532674f428b
      https://github.com/llvm/llvm-project/commit/77df3be0dee415713cf5c79543f00532674f428b
  Author: Alexey Lapshin <a.v.lapshin at mail.ru>
  Date:   2022-06-29 (Wed, 29 Jun 2022)

  Changed paths:
    M llvm/include/llvm/CodeGen/DwarfStringPoolEntry.h
    M llvm/unittests/CodeGen/CMakeLists.txt
    A llvm/unittests/CodeGen/DwarfStringPoolEntryRefTest.cpp

  Log Message:
  -----------
  [Debuginfo][DWARF][NFC] Refactor DwarfStringPoolEntryRef.

This review is extracted from D96035.

This patch adds 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.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D126883




More information about the All-commits mailing list