[PATCH] D51078: Reduce the memory footprint of dsymutil. (NFC)

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 21 17:38:15 PDT 2018


aprantl created this revision.
aprantl added reviewers: friss, JDevlieghere.

This (partially) fixes a regression introduced by
https://reviews.llvm.org/D43945 / r327399, which parallelized
DwarfLinker. This patch avoids parsing and allocating the memory for
all input DIEs up front and instead only allocates them in the
concurrent loop in the AnalyzeLambda. At the end of the loop the
memory from the LinkContext is cleared again.

This reduces the peak memory needed to link the debug info of a
non-modular build of the Swift compiler by >3GB.

rdar://problem/43444464


https://reviews.llvm.org/D51078

Files:
  tools/dsymutil/DwarfLinker.cpp
  tools/dsymutil/DwarfLinker.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51078.161861.patch
Type: text/x-patch
Size: 8098 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180822/3ee2843d/attachment.bin>


More information about the llvm-commits mailing list