This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH PR45098, 7/10] Nowrap limits iterations
Hi,
> As far as I can tell, what is current calculated in i_bound (and assigned to
> nb_iterations_upper_bound), is the maximum amount of times any statement in the
> loop is executed, where any includes exit tests. Differently put, the maximum
> amount of times the loop header is executed.
hmm... this is rather confusing, I don't really recall why I gave
nb_iterations_upper_bound a different semantics from any other instance
of what # of iterations of a loop means.
> This is confirmed by this comment in tree-vrp.c:
>
> /* Try to use estimated number of iterations for the loop to constrain the
> final value in the evolution.
> We are interested in the number of executions of the latch, while
> nb_iterations_upper_bound includes the last execution of the exit test. */
>
> I modified the patch to improved the comment.
I think a better fix would be to make the nb_iterations_upper_bound semantics
consistent with that of nb_iterations. Let me try to do it, hopefully this should
be mostly mechanical,
Zdenek
- References:
- [PATCH, PR45098]
- [PATCH, PR45098, 7/10]
- [PATCH PR45098, 7/10] Nowrap limits iterations
- Re: [PATCH PR45098, 7/10] Nowrap limits iterations
- Re: [PATCH PR45098, 7/10] Nowrap limits iterations
- Re: [PATCH PR45098, 7/10] Nowrap limits iterations
- Re: [PATCH PR45098, 7/10] Nowrap limits iterations
- Re: [PATCH PR45098, 7/10] Nowrap limits iterations
- Re: [PATCH PR45098, 7/10] Nowrap limits iterations
- Re: [PATCH PR45098, 7/10] Nowrap limits iterations