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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 21 10:11:47 PST 2022


MaskRay added a comment.

In D117853#3261856 <https://reviews.llvm.org/D117853#3261856>, @dblaikie wrote:

> Is there any chance to avoid buffering the compressed output? (I guess probably not, because you need to know how large it is before you write it to the output file (if you want to parallelize writing sections, which is important no doubt))

I have asked myself this question... Unfortunately no. To have accurate estimate of sizes, we have to buffer all compressed output.
It's needed to compute sh_offset and sh_size fields of a .debug_* section. To know the size we need to compress it first (or estimate, but the compression ratio is not easy to estimate).


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