> On Fri, 20 Jun 2014, Trevor Saunders wrote: > >> +@item -fipa-icf > >> +@opindex fipa-icf > >> +Perform Identical Code Folding for functions and read-only variables.
I would perhaps explicitly say that the optimizations reduce code size and may disturb unwind stacks by replacing a function by equivalent one with different name. > >> +Behavior is similar to Gold Linker ICF optimization. Symbols proved Perhaps tell a bit more here. The optimization works more effectively with link time optimization enabled and that the Gold and GCC ICF works on different levels and thus are not equivalent optimizations - there are equivallences that are found only by GCC and equivalences found only by Gold. >> +as semantically equivalent are redirected to corresponding symbol. The pass > >> +sensitively decides for usage of alias, thunk or local redirection. > >> +This flag is enabled by default at @option{-O2}. Probably at -Os too. > > I found this a bit hard to read/understand. > > Perhaps first describe what it does and then, before "This flag is > enabled..." note that "This is similar to the ICF optimization performed > by the Gold linker". > > "Symbols proved" (plural) vs "to corresponding symbol" seems to miss > an an "a" as in "a corresponding symbol". Alas, how is that one > determined? Is this more "...are merged into one", from the user's > perspective? > > What does it mean to "sensitively decide for usage of alias, thunk, > or local redirection"? I think this is just a technical detail of the implementation. I would not put that into user manual. It means that for some functions you can make alias, for others you need thunk (so addresses stay different) > > Gerald