This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rtlopt] Value profiling and optimalizations


> Hello,
> 
> > > > > There is nothing different in them; I use different tags because loop
> > > > > histograms and value histograms may be used independently (or both
> > > > > together). A bit more of the code could indeed be shared (mostly the parts in
> > > > > libgcc2.c).
> > > > Hmm, I am not sure, but perhaps it would make more sense if profiling code
> > > > allowed measuring histogram of any quantities and loop code just used it
> > > > for the iteration counts and other code for other values?
> > > 
> > > It already uses the same code for measuring the histograms; I definitely
> > > want to keep the counters separated, but I am going to rewrite the
> > You mean the basic block counters or the loop iteration histograms?
> > In first case I agree.
> > In second case what makes the loop iteration histograms different?
> 
> there is nothing different in them; but I want them to be independent
> (you may for example want to measure both but use only one of them
> for optimizations; this would be impossible if the counters for them
> were mixed together in one section).
Hmm, I don't see much problem here.  I can have
-fprofile-loop-histograms and -fuse-loop-histograms or whatever and have
profiling code to always profile everything that were enabled to be
instrumented, and in feedback state read everything into compiler and
ignore the bits I am not interested in.
All we need is to assign each such quantity an unique ID so they won't
get messed up.  Of course putting multiple quantities into section with
given ID is about the same :) and I guess that is approximately what you
are doing.

But it would be nice to have way to add brand new category of histograms
without having to modify too many places (especially not libgcc as ligcc
should really stay small and simply [uhm]).  Ideally just by adding it
at one place somewhere in profile.c or such.

Honza
> 
> Zdenek


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]