On Sun, May 18, 2014 at 4:56 PM, Jan Hubicka <hubi...@ucw.cz> wrote: > Hi, > this patch adds simple IPA pass that brings symbols used only from > comdat groups into the groups. This prevents dead code in cases > where the comdat group is replaced by a copy from different unit. > > The patch saves about 0.5% of libreoffice binary and about 1% > of firefox binary with section GC disabled. > > One limitation of the pass is that it won't privatize data used by a function > or vice versa, as doing so probably require inveting new comdat group for the > data and turing the symbols into hidden symbols. Something that may make sense > to implement as followup. (in a way we do so for string literals). > > Bootstrapped/regtested x86_64-linux, will commit it after some further > testing. > > Honza > > * tree-pass.h (make_pass_ipa_comdats): New pass. > * timevar.def (TV_IPA_COMDATS): New timevar. > * passes.def (pass_ipa_comdats): Add. > * Makefile.in (OBJS): Add ipa-comdats.o > * ipa-comdats.c: New file. >
This caused: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61324 -- H.J.