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 # of iterations analysis


On Sun, 2005-04-03 at 18:43 +0200, Zdenek Dvorak wrote:
> Hello,
> 
> on some testcases, we spend large amount of time in # of iterations
> analysis (about 3% on PR 18687).  There does not seem to be any
> significant problem with the usage of the analysis (we call it about
> three times per loop, from different optimization passes), just the
> analysis by itself is slow.  This patch contains a few speedups:
> 
> 1) makes tree-ssa-loop-niter use fold_build instead of
>    fold (build (...))
> 2) Adds a special handling for loops with step 1.
> 3) Removes simplify_using_outer_evolutions.  This function does
>    basically constant propagation in weird special cases,
>    like
> 
>    for (i = 0; i < 50; i++)
>      ...;
>    for (; i < 100; i++)
>      ...;
> 
>    to detect that the initial value of i in the second loop is 50.
>    In practice, this just wastes time.


Does your analysis still properly determine that the second loop has 50
iterations with that removed?




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