[all-commits] [llvm/llvm-project] 102f7f: [llvm] Reduce memory footprint of Debug metadata n...

serge-sans-paille via All-commits all-commits at lists.llvm.org
Thu Nov 16 13:55:56 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 102f7fce8d8251655be5bf6955af33e55bea9c9e
      https://github.com/llvm/llvm-project/commit/102f7fce8d8251655be5bf6955af33e55bea9c9e
  Author: serge-sans-paille <sguelton at mozilla.com>
  Date:   2023-11-16 (Thu, 16 Nov 2023)

  Changed paths:
    M llvm/include/llvm/IR/DebugInfoMetadata.h
    M llvm/lib/IR/DebugInfoMetadata.cpp

  Log Message:
  -----------
  [llvm] Reduce memory footprint of Debug metadata nodes (#71227)

Using a combination of reordering fields and using empty SubclassData32
/ SubclassData1, it's possible to improve the size of data structures
used to store debug info in the IR:

Before:

DILexicalBlock: 24
DILexicalBlockFile: 24
DIModule: 24
DITemplateParameter: 24
DICommonBlock: 24
DIMacro: 24
DICompileUnit: 56
DIType: 48
DINamespace: 24
DIVariable: 24
DIGlobalVariable: 32
DILocalVariable: 32
DILabel: 24

After:

DILexicalBlock: 24
DILexicalBlockFile: 16
DIModule: 16
DITemplateParameter: 16
DICommonBlock: 16
DIMacro: 16
DICompileUnit: 48
DIType: 40
DINamespace: 16
DIVariable: 24
DIGlobalVariable: 24
DILocalVariable: 32
DILabel: 16




More information about the All-commits mailing list