Re: RFC: Inlines, LTO and GCC

2013-09-10 Thread Andrew MacLeod
On 09/10/2013 04:44 AM, Richard Biener wrote: On Tue, Sep 10, 2013 at 10:11 AM, Jakub Jelinek wrote: On Tue, Sep 10, 2013 at 10:06:04AM +0200, David Brown wrote: This last point is crucial. I haven't looked at the code in question, but one point to check is how the functions are called. If t

Re: RFC: Inlines, LTO and GCC

2013-09-10 Thread Jan Hubicka
> > > > But then inlining / cloning is no longer cheap, no? And will be > > disabled at -O2? > > If you declare it "inline" and not "static inline" it will be inlined pretty > much as before, only it will get unified if it ends up out of line in multiple > units. > > Main difference in betwee

Re: RFC: Inlines, LTO and GCC

2013-09-10 Thread Jan Hubicka
> > But then inlining / cloning is no longer cheap, no? And will be > disabled at -O2? If you declare it "inline" and not "static inline" it will be inlined pretty much as before, only it will get unified if it ends up out of line in multiple units. Main difference in between static and non-s

Re: RFC: Inlines, LTO and GCC

2013-09-10 Thread Richard Biener
On Tue, Sep 10, 2013 at 11:06 AM, Jan Hubicka wrote: >> On 10/09/13 10:11, Jakub Jelinek wrote: >> > On Tue, Sep 10, 2013 at 10:06:04AM +0200, David Brown wrote: >> >> This last point is crucial. I haven't looked at the code in question, >> >> but one point to check is how the functions are calle

Re: RFC: Inlines, LTO and GCC

2013-09-10 Thread Jan Hubicka
> On 10/09/13 10:11, Jakub Jelinek wrote: > > On Tue, Sep 10, 2013 at 10:06:04AM +0200, David Brown wrote: > >> This last point is crucial. I haven't looked at the code in question, > >> but one point to check is how the functions are called. If they are > >> often called with constant values, th

Re: RFC: Inlines, LTO and GCC

2013-09-10 Thread Richard Biener
On Tue, Sep 10, 2013 at 10:11 AM, Jakub Jelinek wrote: > On Tue, Sep 10, 2013 at 10:06:04AM +0200, David Brown wrote: >> This last point is crucial. I haven't looked at the code in question, >> but one point to check is how the functions are called. If they are >> often called with constant valu

Re: RFC: Inlines, LTO and GCC

2013-09-10 Thread David Brown
On 10/09/13 10:11, Jakub Jelinek wrote: > On Tue, Sep 10, 2013 at 10:06:04AM +0200, David Brown wrote: >> This last point is crucial. I haven't looked at the code in question, >> but one point to check is how the functions are called. If they are >> often called with constant values, then they ma

Re: RFC: Inlines, LTO and GCC

2013-09-10 Thread Jakub Jelinek
On Tue, Sep 10, 2013 at 10:06:04AM +0200, David Brown wrote: > This last point is crucial. I haven't looked at the code in question, > but one point to check is how the functions are called. If they are > often called with constant values, then they may be very much simplified > due to constant p

Re: RFC: Inlines, LTO and GCC

2013-09-10 Thread David Brown
On 10/09/13 04:44, Jeff Law wrote: > On 09/09/2013 02:45 PM, Andrew MacLeod wrote: >> A number of header files have inline functions declared in them. Some of >> these functions are actually quite large, and I doubt that inlining them >> is the right thing. For instance, tree-flow-inline.h has so

Re: RFC: Inlines, LTO and GCC

2013-09-09 Thread Jeff Law
On 09/09/2013 02:45 PM, Andrew MacLeod wrote: A number of header files have inline functions declared in them. Some of these functions are actually quite large, and I doubt that inlining them is the right thing. For instance, tree-flow-inline.h has some quite large functions. Many of the op_it

RFC: Inlines, LTO and GCC

2013-09-09 Thread Andrew MacLeod
A number of header files have inline functions declared in them. Some of these functions are actually quite large, and I doubt that inlining them is the right thing. For instance, tree-flow-inline.h has some quite large functions. Many of the op_iter* functions are 30-40 lines long, and get_