[PATCH] D117853: [ELF] Parallelize --compress-debug-sections=zlib

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 20 23:42:34 PST 2022


MaskRay added inline comments.


================
Comment at: lld/ELF/OutputSections.cpp:292
+#if LLVM_ENABLE_ZLIB
+static SmallVector<uint8_t, 0> deflateShard(ArrayRef<uint8_t> in, int level,
+                                            bool isLast) {
----------------
alexander-shaposhnikov wrote:
> I'm wondering if you have considered using llvm/Support/Compression.h
> (the implementation there appears to contain some bits to make it msan-friendly + error handling, but I'm not closely familiar with that code)
The code is largely lld/ELF specific. If I add the code to llvm/Support/Compression.h, LLVMSupport will get bloated. Technically llvm-objcopy --compress-debug-sections can use the code as well but the two projects may have different tweaks and sharing code won't help much in my opinion.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117853/new/

https://reviews.llvm.org/D117853



More information about the llvm-commits mailing list