<div dir="ltr">Yep, I'd be curious to see more data - comparisons of sections sizes (<a href="https://github.com/google/bloaty">Bloaty</a> is a handy tool to make comparisons simpler (though for a one off might not be worth the hassle of going and downloading/building it/etc)) & any work that could be done isolating/reducing the test case (hopefully enough that it can be shared) and verifying what differences might exist between the two compilations if there's anything other than the compiler version.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 30, 2021 at 3:33 AM Jeremy Morse <<a href="mailto:jeremy.morse.llvm@gmail.com">jeremy.morse.llvm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Chuanqi,<br>
<br>
On Tue, Mar 30, 2021 at 9:47 AM chuanqi.xcq via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
> In a private code bases, I find that the binary size produced in llvm-11 is 60M while the size produced in trunk is 51M.<br>
><br>
> I tried to find the patch who made this change in git log or in phabricator by keywords like `reduce`, 'size' or 'binary'. But I find nothing.<br>
<br>
Interesting -- which sections reduce in size between llvm-11 and<br>
trunk? Assuming you're using ELF/DWARF binaries, `readelf -W -S` will<br>
give you sections and sizes.<br>
<br>
Since llvm-11 branched, there were some patches [0] that improved how<br>
variable locations are represented in DWARF, I've seen some binaries<br>
where that reduced file size by 10%. That would be reflected in the<br>
.debug_loc section. There's also the constructor homing flag, passed<br>
to clang with "-Xclang -fuse-ctor-homing", I'm not sure whether it's<br>
on by default in trunk. That would show a significant reduction in the<br>
.debug_info section.<br>
<br>
[0] <a href="https://reviews.llvm.org/rG0b5a8050ea39355a3876cc6bba9383d91e224e1f" rel="noreferrer" target="_blank">https://reviews.llvm.org/rG0b5a8050ea39355a3876cc6bba9383d91e224e1f</a><br>
<br>
--<br>
Thanks,<br>
Jeremy<br>
</blockquote></div>