[patch] Always initialize current_loops in loop_optimizer_init

Sebastian Pop sebpop@gmail.com
Mon May 28 13:28:00 GMT 2007


Hi,

On 5/25/07, Zdenek Dvorak <rakdver@kam.mff.cuni.cz> wrote:
> Index: tree-chrec.c
> ===================================================================
> *** tree-chrec.c        (revision 124985)
> --- tree-chrec.c        (working copy)
> *************** evolution_function_is_invariant_rec_p (t
> *** 974,986 ****
>   bool
>   evolution_function_is_invariant_p (tree chrec, int loopnum)
>   {
> !   if (evolution_function_is_constant_p (chrec))
> !     return true;
> !
> !   if (current_loops != NULL)
> !     return evolution_function_is_invariant_rec_p (chrec, loopnum);
> !
> !   return false;
>   }
>
>   /* Determine whether the given tree is an affine multivariate
> --- 974,980 ----
>   bool
>   evolution_function_is_invariant_p (tree chrec, int loopnum)
>   {
> !   return evolution_function_is_invariant_rec_p (chrec, loopnum);
>   }
>
>   /* Determine whether the given tree is an affine multivariate

In this simplification you also can remove function evol..._rec_p
and inline its code in evol..._invariant_p.

Sebastian



More information about the Gcc-patches mailing list