tejohnson added a comment.

In https://reviews.llvm.org/D24644#557774, @pcc wrote:

> Perhaps it would be better to enable -ffunction-sections/-fdata-sections 
> unconditionally at the linker level if the linker supports it? See also 
> PR22999.


My understanding is that these are not typically the default because it makes 
the resulting object files larger and the link slower. OTOH, for ThinLTO we 
definitely benefit more from these optimizations (and from PR22999 looks like 
there is a compelling reason to want this for LTO as well).

However, when you say enable them "unconditionally at the linker level" what do 
you mean - these need to go LLVM via plugin options. Are you suggesting having 
them enabled unconditionally in both gold-plugin and gold? That will require 
changes to both llvm and binutils, and the latter will have effects for other 
compilers. What about -Wl,-gc-sections, isn't that also needed to make 
effective use of these options?


https://reviews.llvm.org/D24644



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to