------- Comment #6 from rakdver at gcc dot gnu dot org  2005-10-09 19:36 -------
With the recent changes to scev analysis that ensure that signed chrecs do not
wrap (assuming -fno-wrapv), it is fairly easy to get tree level # of iterations
analysis to use this fact, see the attached patch.

This does not directly help doloop opts that work on rtl, though.  There are
two possible solutions:

1) Rewrite the loop on tree level to a form that is easier to analyse, e.g.,
for (i = 0; i != n + 1; i++)

2) Somehow pass the information that the loop is not infinite (or even that its
control iv does not wrap) to rtl.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18527

Reply via email to