[PATCH] D70658: [LLD][ELF] - Make compression level be dependent on -On.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 26 00:25:05 PST 2019
ruiu added inline comments.
================
Comment at: lld/ELF/OutputSections.cpp:273
// Write section contents to a temporary buffer and compress it.
std::vector<uint8_t> buf(size);
writeTo<ELFT>(buf.data());
----------------
It's worth adding a comment here to explain why we chose 6 and 1 as optimization levels. We chose 1 as the default compression level because it is the fastest. If -O2 is given, we use level 6 to compress debug info more by ~15%. We found that level 7 to 9 doesn't make much difference (~1% more compression) while they take significant amount of time (~2x), so level 6 seems enough.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70658/new/
https://reviews.llvm.org/D70658
More information about the llvm-commits
mailing list