Re: Profile housekeeping 6/n (-fprofile-consistency-report)

2012-10-09 Thread Jan Hubicka
> On Sat, Oct 6, 2012 at 5:56 PM, Jan Hubicka wrote: > > Hi, > > does this look better? Moving to cfg.c would importing tree-pass.h and rtl.h > > that is not cool either. predict.c does all of these. > > Obviously can also go to a separate file, if preferred. > > Attached is how I would do it. Wh

Re: Profile housekeeping 6/n (-fprofile-consistency-report)

2012-10-08 Thread Steven Bosscher
On Sat, Oct 6, 2012 at 5:56 PM, Jan Hubicka wrote: > Hi, > does this look better? Moving to cfg.c would importing tree-pass.h and rtl.h > that is not cool either. predict.c does all of these. > Obviously can also go to a separate file, if preferred. Attached is how I would do it. What do you thin

Re: Profile housekeeping 6/n (-fprofile-consistency-report)

2012-10-06 Thread Jan Hubicka
Hi, does this look better? Moving to cfg.c would importing tree-pass.h and rtl.h that is not cool either. predict.c does all of these. Obviously can also go to a separate file, if preferred. If it looks fine to you, I will commit it after testing. Honza Index: tree-pass.h ===

Re: Profile housekeeping 6/n (-fprofile-consistency-report)

2012-10-06 Thread Jan Hubicka
> On Sat, Oct 6, 2012 at 4:39 PM, Steven Bosscher wrote: > > >> If there are no complains I will commit the patch tomorrow. > > > > +1 complaint. > > You're putting profile stuff and even RTL stuff in the pass manager. > > That is Just Wrong. > > You already committed the patch. Your tomorrow st

Re: Profile housekeeping 6/n (-fprofile-consistency-report)

2012-10-06 Thread Jan Hubicka
> On Sat, Oct 6, 2012 at 4:10 PM, Jan Hubicka wrote: > >> > Index: passes.c > >> > +/* Hold statistic about profile consistency. */ > >> ... > >> > >> I don't see why this should live in passes.c, can you please put it in > >> a more logical place (profile.c, perhaps)? > > > > Hmm, the problem he

Re: Profile housekeeping 6/n (-fprofile-consistency-report)

2012-10-06 Thread Steven Bosscher
On Sat, Oct 6, 2012 at 4:39 PM, Steven Bosscher wrote: >> If there are no complains I will commit the patch tomorrow. > > +1 complaint. > You're putting profile stuff and even RTL stuff in the pass manager. > That is Just Wrong. You already committed the patch. Your tomorrow started early? ;-)

Re: Profile housekeeping 6/n (-fprofile-consistency-report)

2012-10-06 Thread Jan Hubicka
> Jan. > > This patch also breaks bootstrap due compilation errors reported for > pases.c and toplev.c Sorry for that. I swapped files and used old version of the patch. It should be fixed now. Honza > > Graham

Re: Profile housekeeping 6/n (-fprofile-consistency-report)

2012-10-06 Thread Graham Stott
Jan. This patch also breaks bootstrap due compilation errors reported for pases.c and toplev.c Graham

Re: Profile housekeeping 6/n (-fprofile-consistency-report)

2012-10-06 Thread Steven Bosscher
On Sat, Oct 6, 2012 at 4:10 PM, Jan Hubicka wrote: >> > Index: passes.c >> > +/* Hold statistic about profile consistency. */ >> ... >> >> I don't see why this should live in passes.c, can you please put it in >> a more logical place (profile.c, perhaps)? > > Hmm, the problem here is that the cod

Re: Profile housekeeping 6/n (-fprofile-consistency-report)

2012-10-06 Thread Jan Hubicka
> > Index: passes.c > > +/* Hold statistic about profile consistency. */ > ... > > I don't see why this should live in passes.c, can you please put it in > a more logical place (profile.c, perhaps)? Hmm, the problem here is that the code is using passmanager's dumping bits to order the passes an

Re: Profile housekeeping 6/n (-fprofile-consistency-report)

2012-10-04 Thread Jan Hubicka
> On Thu, Oct 4, 2012 at 4:01 PM, Jan Hubicka wrote: > > * doc/invoke.texi (-fprofile-consistency-report): Document. > > * common.opt (fprofile-consistency-report): New. > > * toplev.h (dump_profile_consistency_report): Declare. > > * toplev.c (finalize): Call dump_p

Re: Profile housekeeping 6/n (-fprofile-consistency-report)

2012-10-04 Thread Steven Bosscher
On Thu, Oct 4, 2012 at 4:01 PM, Jan Hubicka wrote: > * doc/invoke.texi (-fprofile-consistency-report): Document. > * common.opt (fprofile-consistency-report): New. > * toplev.h (dump_profile_consistency_report): Declare. > * toplev.c (finalize): Call dump_profile_con

Profile housekeeping 6/n (-fprofile-consistency-report)

2012-10-04 Thread Jan Hubicka
Hi, this patch implements -fprofile-consistency-report that is useful to get an statistic about what pass are major offenders in keeping profile up-to-date. For example the following is output for combine.c Pass: fnsplit (after pass) mismatched in: +16 (freqs) +0 (counts); michma