Re: [PATCH 1/5] New Identical Code Folding IPA pass

2014-06-18 Thread Jan Hubicka
> On 06/13/14 04:24, mliska wrote: > > > >You may ask, why the GNU GCC does need such a new optimization. The > >compiler, having simply better knowledge of a compiled source file, > >is capable of reaching better results, especially if Link-Time > >optimization is enabled. Apart from that, GCC imp

Re: [PATCH 1/5] New Identical Code Folding IPA pass

2014-06-18 Thread Paolo Carlini
Hi, On 18/06/14 10:46, Martin Liška wrote: As one would expect, there is a function 'size'. Cool, thanks! Paolo.

Re: [PATCH 1/5] New Identical Code Folding IPA pass

2014-06-18 Thread Martin Liška
On 06/17/2014 10:09 PM, Paolo Carlini wrote: Hi, On 13/06/14 12:24, mliska wrote: The optimization is inspired by Microsoft /OPT:ICF optimization (http://msdn.microsoft.com/en-us/library/bxwfs976.aspx) that merges COMDAT sections with each function reside in a separate section. In terms

Re: [PATCH 1/5] New Identical Code Folding IPA pass

2014-06-18 Thread Martin Liška
On 06/17/2014 10:14 PM, David Malcolm wrote: On Fri, 2014-06-13 at 12:24 +0200, mliska wrote: [...snip...] Statistics about the pass: Inkscape: 11.95 MB -> 11.44 MB (-4.27%) Firefox: 70.12 MB -> 70.12 MB (-3.07%) FWIW, you wrote 70.12 MB here for both before and after for Firefox, but

Re: [PATCH 1/5] New Identical Code Folding IPA pass

2014-06-17 Thread David Malcolm
On Fri, 2014-06-13 at 12:24 +0200, mliska wrote: [...snip...] > Statistics about the pass: > Inkscape: 11.95 MB -> 11.44 MB (-4.27%) > Firefox: 70.12 MB -> 70.12 MB (-3.07%) FWIW, you wrote 70.12 MB here for both before and after for Firefox, but give a -3.07% change, which seems like a typo

Re: [PATCH 1/5] New Identical Code Folding IPA pass

2014-06-17 Thread Paolo Carlini
Hi, On 13/06/14 12:24, mliska wrote: The optimization is inspired by Microsoft /OPT:ICF optimization (http://msdn.microsoft.com/en-us/library/bxwfs976.aspx) that merges COMDAT sections with each function reside in a separate section. In terms of C++ testcases, I'm wondering if you already d

Re: [PATCH 1/5] New Identical Code Folding IPA pass

2014-06-17 Thread Jeff Law
On 06/13/14 04:24, mliska wrote: You may ask, why the GNU GCC does need such a new optimization. The compiler, having simply better knowledge of a compiled source file, is capable of reaching better results, especially if Link-Time optimization is enabled. Apart from that, GCC implementation add