[llvm] Fix compression header size check in ELF writer (PR #66888)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 21 10:44:57 PDT 2023


myxoid wrote:

This test is to see whether compression is worth it.

Size <= HdrSize + CompressedContents.size())

Is the original uncompressed size less than or equal to the compressed size plus the compression header?

To test the change I'd need to find a case where the DWARF section compressed to approximately the same size as the original data, but the difference in compression header size (12 vs 32 bytes) would have made a difference in the decision taken.

That does sound like a fairly tall order.

On top of this, I have zero experience with the LLVM test suite.

And finally, making a suboptimal compression vs no-compression decision that is at worst 20 bytes wrong isn't going to upset many people.


https://github.com/llvm/llvm-project/pull/66888


More information about the llvm-commits mailing list