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,
> This patch attemps to estimate the number of iterations of the loop based on
> nonwrapping arithmetic in the loop body.
>
> 2011-05-05 Tom de Vries <tom@codesourcery.com>
>
> PR target/45098
> * tree-ssa-loop-ivopts.c (struct ivopts_data): Add fields
> max_iterations_p and max_iterations.
> (is_nonwrap_use, max_loop_iterations, set_max_iterations): New function.
> (may_eliminate_iv): Use max_iterations_p and max_iterations.
> (tree_ssa_iv_optimize_loop): Use set_max_iterations.
what are the cases this handles better than the existing analysis of maximum numbers of iterations
(estimate_numbers_of_iterations)? Would it be possible to add the handling of these cases
to estimate_numbers_of_iterations, rather than doing it just for ivopts?
Zdenek