chuanqi.xcq via llvm-dev
2021-Mar-30 08:47 UTC
[llvm-dev] Why the binary size in trunk are smaller significantly?
Hi all, I am working on how to reduce the size of the binary produced for coroutine with `-g`. 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. 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. May I ask does anyone knows what patch makes the binary size smaller from llvm-11 to now? thanks, Chuanqi -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210330/106c41e2/attachment.html>
Jeremy Morse via llvm-dev
2021-Mar-30 10:33 UTC
[llvm-dev] Why the binary size in trunk are smaller significantly?
Hi Chuanqi, On Tue, Mar 30, 2021 at 9:47 AM chuanqi.xcq via llvm-dev <llvm-dev at lists.llvm.org> wrote:> 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. > > 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.Interesting -- which sections reduce in size between llvm-11 and trunk? Assuming you're using ELF/DWARF binaries, `readelf -W -S` will give you sections and sizes. Since llvm-11 branched, there were some patches [0] that improved how variable locations are represented in DWARF, I've seen some binaries where that reduced file size by 10%. That would be reflected in the .debug_loc section. There's also the constructor homing flag, passed to clang with "-Xclang -fuse-ctor-homing", I'm not sure whether it's on by default in trunk. That would show a significant reduction in the .debug_info section. [0] https://reviews.llvm.org/rG0b5a8050ea39355a3876cc6bba9383d91e224e1f -- Thanks, Jeremy
Chris Tetreault via llvm-dev
2021-Mar-30 16:46 UTC
[llvm-dev] Why the binary size in trunk are smaller significantly?
The patch that did it might have been trying to solve some unrelated problem, and this was just a side effect. Perhaps a git-bisect could help you isolate the patch? Thanks, Christopher Tetreault From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of chuanqi.xcq via llvm-dev Sent: Tuesday, March 30, 2021 1:47 AM To: llvm-dev at lists.llvm.org Subject: [EXT] [llvm-dev] Why the binary size in trunk are smaller significantly? Hi all, I am working on how to reduce the size of the binary produced for coroutine with `-g`. 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. 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. May I ask does anyone knows what patch makes the binary size smaller from llvm-11 to now? thanks, Chuanqi -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210330/35151df8/attachment.html>