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]

Re: ia32: check_decr_loop


> 
> +   /* Look for loops of the form
> +      while (a--) { ... }
> +      where a is not used inside the loop, and optimize them. */
> 
> It was implemented to get a few percent on a tiny loop on a benchmark.
> It seems somewhat silly, except to my surprise the optimization is
> triggered occasionally by real code too -- three times in cc1 itself.

I'm not sure whether it is worthwhile to add several hundred lines of code
for an optimization that triggers only three times in a large program.  How
big are the gains - anything measurable?


Bernd


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