[PATCH] D46874: [MC] - Add .stack_size sections into groups and link them with .text

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 23 01:15:02 PDT 2018


grimar added a comment.

The problem of this patch is benchmark results I had.

I tested linking of clang and chromium (used LLD as a linker, linked with -gc-sections).
(both build with -ffunction-sections -fstack-size-section)

Clang:
Link time changes from 0,428s to 0.481s (~ +12%).
Output size changes from 87,216,640 to 86,983,720 bytes (~ -1%).
Total input objects size changes from 191.3mb to 204.2mb (~ +6,7%).

Chromium:
Link time changes from 6.136s to 6.75s (~ +10%)
Output size changes from 756,347,912 to 753,375,064 bytes (~ -0.4%)
Total input objects size changes from 1,920,795,546 to 2,011,722,858 bytes (~ +4.7%)

So for clang, it allows producing 1% smaller output for a cost of +12% to link time.
For chromium, the benefit is just 0.4%, for about the same link time penalty.


https://reviews.llvm.org/D46874





More information about the llvm-commits mailing list