[all-commits] [llvm/llvm-project] 554aea: [reland][Debuginfo][DWARF][NFC] Refactor DwarfStri...

avl-llvm via All-commits all-commits at lists.llvm.org
Fri Jul 1 10:09:23 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 554aea52d79ebd9353911ecf2ffe14aca132f452
      https://github.com/llvm/llvm-project/commit/554aea52d79ebd9353911ecf2ffe14aca132f452
  Author: Alexey Lapshin <a.v.lapshin at mail.ru>
  Date:   2022-07-01 (Fri, 01 Jul 2022)

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

  Log Message:
  -----------
  [reland][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.

[reland] : make msan happy.

Reviewed By: JDevlieghere

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




More information about the All-commits mailing list