[PATCH] D32560: Turn DISubprogram into a variable-length node

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 26 14:30:26 PDT 2017


aprantl created this revision.
Herald added a subscriber: mehdi_amini.

DISubprogram currently has 10 pointer operands, several of which are
often a nullptr. This patch reduces the amount of memory allocated by
DISubprogram by rearranging the operands such that containing type,
template params, and thrown types come last, and are only allocated
when they are non-null (or followed by non-null operands).

      

This patch also eliminates the entirely unused DisplayName operand.

      

This saves up to 4 pointer operands per DISubprogram. (I tried
measuring the effect on peak memory usage on an LTO link of an X86
llc, but the results were very noisy).


Repository:
  rL LLVM

https://reviews.llvm.org/D32560

Files:
  include/llvm/IR/DebugInfoMetadata.h
  lib/Bitcode/Reader/MetadataLoader.cpp
  lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
  lib/IR/DebugInfoMetadata.cpp
  tools/opt/BreakpointPrinter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32560.96822.patch
Type: text/x-patch
Size: 7772 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170426/2c295012/attachment.bin>


More information about the llvm-commits mailing list