[patch] Make scev instantiation call compute_overall_effect_of_inner_loop
Richard Guenther
rguenther@suse.de
Wed Jun 9 10:07:00 GMT 2010
On Tue, 8 Jun 2010, Sebastian Pop wrote:
> On Tue, Jun 8, 2010 at 16:23, Sebastian Pop <sebpop@gmail.com> wrote:
> > On Tue, Jun 8, 2010 at 14:11, Sebastian Pop <sebpop@gmail.com> wrote:
> >> Hi,
> >>
> >> I remarked that in add_conditions_to_domain, we are adding the exit
> >> condition of a loop to the basic blocks following the loop.
> >> Why do we need to do this?
> >>
> >> The example I am looking at is a bit more complicated than this,
> >> but here is an abstraction that shows the problem:
> >>
> >> loop
> >> Â bb0:
> >> Â Â i_0 = phi (0, i_1)
> >> Â Â i_1 = i_0 + 1
> >> Â Â if (i_0 < 1000)
> >> Â Â Â goto bb1
> >> Â Â else
> >> Â Â Â goto bb2
> >>
> >> Â bb1:
> >> Â Â goto bb0
> >> end_loop
> >>
> >> bb2:
> >> Â S;
> >>
> >> We want to add the condition "i_0 >= 1000" to the domain of bb2, and
> >> this fails in my case as the scev analysis is not able to compute the
> >> overall effect of the inner loop on i_0. Â In the end I wrote a patch
> >> that makes scev return the right answer, and not surprisingly, in the
> >> simple example above, we insert a useless constraint: 1000 >= 1000.
> >
> > So here is that other patch that makes the instantiation of the SCEVs
> > call compute_overall_effect_of_inner_loop when the instantiation
> > should happen in an outer loop than where the SSA_NAME was defined.
> >
> > Regstrap in progress on amd64-linux. Â Ok for trunk?
>
> Passed regstrap.
Ok.
Thanks,
Richard.
More information about the Gcc-patches
mailing list