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: [PATCH] Value profile based optimizations, part 1


Hello,

> > static void insn_values_to_profile	PARAMS ((rtx, unsigned *,
> > 					    	 struct histogram_value **));
> 
> Can you use ISO C 90 prototypes everywhere?  With a new file, we do
> not need to use PARAMS or ...
> > [...]
> > /* Find list of values for that we want to measure histograms.  */
> > void
> > find_values_to_profile (n_values, values)
> >      unsigned *n_values;
> >      struct histogram_value **values;
> 
> this.

of course; I have just missed these two cases (I hope).

Zdenek

> > {
> >   rtx insn;
> >   unsigned i;
> >
> >   *n_values = 0;
> >   *values = NULL;
> >   for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
> >     insn_values_to_profile (insn, n_values, values);
> >
> >   for (i = 0; i < *n_values; i++)
> >     {
> >       switch ((*values)[i].type)
> > 	{
> > 	case HIST_TYPE_INTERVAL:
> > 	  (*values)[i].n_counters = (*values)[i].hdata.intvl.steps +
> > 		  ((*values)[i].hdata.intvl.may_be_less ? 1 : 0) +
> > 		  ((*values)[i].hdata.intvl.may_be_more ? 1 : 0);
> 
> AFAIR according to the coding styles this should be wrapped around
> with the + at the beginning of the line and not at the end.
> 
> 
> Andreas
> -- 
>  Andreas Jaeger
>   SuSE Labs aj@suse.de
>    private aj@arthur.inka.de
>     http://www.suse.de/~aj


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