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: [lno] scev fixes


Hello,

> > -- givs not being detected because of colision of marks on phis used
> >    also by biv analysis
> 
> I didn't get how you solved the problem of cycles in phi nodes without
> using the PHI_MARKED flags, could you explain this part please?

as long as we check for irreducible loops & handle loop phi nodes
separately, the rest of the graph is acyclic, so there is no need for
marking.

> > -- removed the system of inner/outer chrecs associated with ssa names
> >    that did not really work well in more complicated cases.  Instead
> >    we now cache the evolutions of ssa names separately for each loop;
> 
> Could you send an example or a testcase where the previous system of
> one "inner/outer" chrec per SSA_NAME did not work, and explain why?

for (j = 0; j < 100; j++)      /* 1 */
  for (k = 0; k < 100; k++)    /* 2 */
    x = 2 * j;

If you start by analysing x from the loop 1, you conclude that
x <- {0, +, 2}_1.  When you then analyse it from the loop 2,
you want to get x <- 2 * j (since j is invariant in it), but this
cannot be deduced from the value stored for x previously.

> (In particular I'm interested in knowing why you have to pass to
> compute_overall_effect_of_inner_loop the loop parameter, ie. the part
> of the patch below. )

Because the overall effect of loop 2 on x is x <- 2 * j, while
the one of the loop 1 is x <- 198, i.e. it is different depending
on which outer loop you are interested in.

Zdenek


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