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] Speed up for_each_rtx


On Thu, 2005-01-20 at 13:03, Paolo Bonzini wrote:
> I found out that the cause of the speed up in my patch is not the 
> elimination of the indirect call, but the elimination of useless 
> recursive calls for leaves.  Indeed this much simpler patch (and 
> suitable for stage3) that I attach still achieves a good speedup:
> 
>                FOR_EACH_RTX  this patch
> combine.i       0m18.010s    0m17.710s (-1.67%)
> fold-const.i    0m38.460s    0m37.880s (-1.51%)
> insn-attrtab.i  0m31.320s    0m30.870s (-1.44%)
> insn-recog.i    0m49.890s    0m49.520s (-0.75%)
> reload.i        0m14.180s    0m13.750s (-3.04%)
> reload1.i       0m13.540s    0m12.790s (-5.54%)
> 
> bootstrap     123m13.560s  121m31.390s (-1.39%)
> 

Hmm, interesting.


> +/* Optimized loop of for_each_rtx, which tries to avoid useless recursive
> +   calls.  Processes the subexpressions of EXP and passes them to F*/

Comment format.


> +void
> +init_rtlanal (void)
> +{
> +  int i;
> +  for (i = 0; i < NUM_RTX_CODE; i++)
> +    {
> +      const char *format = GET_RTX_FORMAT (i);
> +      const char *first = strpbrk (format, "eEV");
> +      non_rtx_starting_operands[i] = first ? first - format : -1;
> +    }
> +}

It ought to be possible to get one of the genfoo programs to generate
this information statically.  Nothing changes in this table in between
compilations.


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