Re: Whole program optimization and functions-only-called-once.

2009-11-15 Thread Tim Prince
Toon Moene wrote: Richard Guenther wrote: On Sun, Nov 15, 2009 at 8:07 AM, Toon Moene wrote: Steven Bosscher wrote: At least CPROP, LCM-PRE, and HOIST (i.e. all passes in gcse.c), and variable tracking. Are they covered by a --param ? At least that way I could teach them to go on in

Re: Whole program optimization and functions-only-called-once.

2009-11-15 Thread Toon Moene
Richard Guenther wrote: On Sun, Nov 15, 2009 at 8:07 AM, Toon Moene wrote: Steven Bosscher wrote: At least CPROP, LCM-PRE, and HOIST (i.e. all passes in gcse.c), and variable tracking. Are they covered by a --param ? At least that way I could teach them to go on indefinitely ... I

Re: Whole program optimization and functions-only-called-once.

2009-11-15 Thread Richard Guenther
On Sun, Nov 15, 2009 at 8:07 AM, Toon Moene wrote: > Steven Bosscher wrote: > >> On Sat, Nov 14, 2009 at 11:12 PM, Richard Guenther >> wrote: > >>> I don't even remember which other passes have this kind of cut-offs .. >> >> At least CPROP, LCM-PRE, and HOIST (i.e. all passes in gcse.c), and >> v

Re: Whole program optimization and functions-only-called-once.

2009-11-15 Thread Toon Moene
Steven Bosscher wrote: On Sat, Nov 14, 2009 at 11:12 PM, Richard Guenther wrote: I don't even remember which other passes have this kind of cut-offs .. At least CPROP, LCM-PRE, and HOIST (i.e. all passes in gcse.c), and variable tracking. Are they covered by a --param ? At least that wa

Re: Whole program optimization and functions-only-called-once.

2009-11-15 Thread Steven Bosscher
On Sat, Nov 14, 2009 at 11:12 PM, Richard Guenther wrote: > I don't even remember which other passes have this kind of cut-offs .. At least CPROP, LCM-PRE, and HOIST (i.e. all passes in gcse.c), and variable tracking. Ciao! Steven

Re: Whole program optimization and functions-only-called-once.

2009-11-14 Thread Richard Guenther
On Sat, Nov 14, 2009 at 2:13 PM, Steven Bosscher wrote: > On Sat, Nov 14, 2009 at 8:51 PM, Richard Guenther > wrote: >> Note that some optimizers (for example value-numbering) contain cut-offs >> so that they are turned off for large functions as otherwise compile-time >> issues appear as algorit

Re: Whole program optimization and functions-only-called-once.

2009-11-14 Thread Toon Moene
Richard Guenther wrote: 2009/11/14 Toon Moene : However, my endeavour is to boldly go where no inliner has gone before, and implement -falways-inline-functions-only-called-once, along the following lines: ... (Sugg. b. Rich. G.), because inlining functions that are only called once is a

Re: Whole program optimization and functions-only-called-once.

2009-11-14 Thread Steven Bosscher
On Sat, Nov 14, 2009 at 8:51 PM, Richard Guenther wrote: > Note that some optimizers (for example value-numbering) contain cut-offs > so that they are turned off for large functions as otherwise compile-time > issues appear as algorithms are non-linear in the size of the function. > > So it might

Re: Whole program optimization and functions-only-called-once.

2009-11-14 Thread Richard Guenther
2009/11/14 Toon Moene : > Jan Hubicka wrote: > >> -fno-ipa-cp should work around your problem for time being. > > Indeed it did. Some figures: > > hlprog (the main forecast program): > > link time optimization time: 3:20 minutes > top memory usage:            920  Mbyte > > Inliner report: > > Inli

Re: Whole program optimization and functions-only-called-once.

2009-11-14 Thread Toon Moene
Jan Hubicka wrote: -fno-ipa-cp should work around your problem for time being. Indeed it did. Some figures: hlprog (the main forecast program): link time optimization time: 3:20 minutes top memory usage:920 Mbyte Inliner report: Inlined 764 calls, eliminated 226 functions, siz

Re: Whole program optimization and functions-only-called-once.

2009-11-12 Thread Jan Hubicka
Hi, this is WIP patch to deal with the unreachable clones problem. It basically renders the clones as unanalyzed cgraph nodes (but with still body in) so IPA passes don't see them. Honza Index: cgraph.c === --- cgraph.c(revision

Re: Whole program optimization and functions-only-called-once.

2009-11-12 Thread Jan Hubicka
> On Wed, Nov 4, 2009 at 1:20 PM, Toon Moene wrote: > > You don't happen to recall the bug number ? > > It might be related to PR 41735 which I noticed when looking at the > generated assembly and trying to compare 4.5 to 4.4. I fixed this bug today, so it might help. But it is related to COMDAT

Re: Whole program optimization and functions-only-called-once.

2009-11-12 Thread Jan Hubicka
> On Wed, Nov 4, 2009 at 8:19 PM, Toon Moene wrote: > > Jan, > > > > I had some time to study the example I sent you a couple of weeks ago. > > > > According to visible inspection of the source code, there are 5 functions > > (subroutines in Fortran parlance) that are called once: > > > > MAIN   c

Re: Whole program optimization and functions-only-called-once.

2009-11-04 Thread Richard Guenther
On Wed, Nov 4, 2009 at 10:30 PM, Andrew Pinski wrote: > On Wed, Nov 4, 2009 at 1:20 PM, Toon Moene wrote: >> You don't happen to recall the bug number ? > > It might be related to PR 41735 which I noticed when looking at the > generated assembly and trying to compare 4.5 to 4.4. Yes indeed. Hon

Re: Whole program optimization and functions-only-called-once.

2009-11-04 Thread Andrew Pinski
On Wed, Nov 4, 2009 at 1:20 PM, Toon Moene wrote: > You don't happen to recall the bug number ? It might be related to PR 41735 which I noticed when looking at the generated assembly and trying to compare 4.5 to 4.4. Thanks, Andrew Pinski

Re: Whole program optimization and functions-only-called-once.

2009-11-04 Thread Toon Moene
Richard Guenther wrote: I think the underlying issue is phtask/41(-1) @0x7fd198c35100 availability:local 26416 time, 4268 benefit 4541 size, 880 benefit 480 bytes stack usage reachable body local finalized inlinable called by: phcall/33(-1) @0x7fd198c33a00 availability:local 8281 time, 972 ben

Re: Whole program optimization and functions-only-called-once.

2009-11-04 Thread Richard Guenther
On Wed, Nov 4, 2009 at 8:19 PM, Toon Moene wrote: > Jan, > > I had some time to study the example I sent you a couple of weeks ago. > > According to visible inspection of the source code, there are 5 functions > (subroutines in Fortran parlance) that are called once: > > MAIN   calls > HLPROG call