Re: [PATCH PR45098, 7/10] Nowrap limits iterations

2011-06-11 Thread Zdenek Dvorak
Hi, > > 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, > > > > This patch changes the semantics of nb_iterations_upper_bound and > nb_iteratio

Re: [PATCH PR45098, 7/10] Nowrap limits iterations

2011-06-11 Thread Tom de Vries
Hi Zdenek, On 05/31/2011 10:04 AM, Zdenek Dvorak wrote: > 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 pu

Re: [PATCH PR45098, 7/10] Nowrap limits iterations

2011-05-31 Thread Zdenek Dvorak
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. hm

Re: [PATCH PR45098, 7/10] Nowrap limits iterations

2011-05-31 Thread Tom de Vries
On 05/30/2011 02:38 PM, Zdenek Dvorak wrote: > Hi, > >>> The header block of the loop is bb 4, the latch block is bb 3: >>> ... >>> (gdb) p loop.header.index >>> $4 = 4 >>> (gdb) p loop.latch.index >>> $5 = 3 >>> ... >>> >>> The number of times the latch edge is executed, is 10. >>> >>> But loop->

Re: [PATCH PR45098, 7/10] Nowrap limits iterations

2011-05-30 Thread Zdenek Dvorak
Hi, > > The header block of the loop is bb 4, the latch block is bb 3: > > ... > > (gdb) p loop.header.index > > $4 = 4 > > (gdb) p loop.latch.index > > $5 = 3 > > ... > > > > The number of times the latch edge is executed, is 10. > > > > But loop->nb_iterations_upper_bound, or max_niter is 11:

Re: [PATCH PR45098, 7/10] Nowrap limits iterations

2011-05-28 Thread Tom de Vries
Hi Zdenek, On 05/21/2011 07:59 PM, Tom de Vries wrote: > On 05/21/2011 02:24 PM, Zdenek Dvorak wrote: >>> * tree-ssa-loop-ivopts.c (may_eliminate_iv): Fix >>> estimated_loop_iterations comparison. >> >> I don't think this part is correct, though: >> >>> Index: gcc/tree-ssa-loop-ivopts.c >>

Re: [PATCH PR45098, 7/10] Nowrap limits iterations

2011-05-23 Thread H.J. Lu
On Sat, May 21, 2011 at 5:24 AM, Zdenek Dvorak wrote: > Hi, > >> > Would it be possible to add the handling of these cases >> > to estimate_numbers_of_iterations, rather than doing it just for ivopts? >> >> Yes, I did that now. >> >> Thanks, >> - Tom >> >> 2011-05-05  Tom de Vries   >> >>       PR

Re: [PATCH PR45098, 7/10] Nowrap limits iterations

2011-05-21 Thread Tom de Vries
On 05/21/2011 02:24 PM, Zdenek Dvorak wrote: >> * tree-ssa-loop-ivopts.c (may_eliminate_iv): Fix >> estimated_loop_iterations comparison. > > I don't think this part is correct, though: > >> Index: gcc/tree-ssa-loop-ivopts.c >> ===

Re: [PATCH PR45098, 7/10] Nowrap limits iterations

2011-05-21 Thread Zdenek Dvorak
Hi, > > Would it be possible to add the handling of these cases > > to estimate_numbers_of_iterations, rather than doing it just for ivopts? > > Yes, I did that now. > > Thanks, > - Tom > > 2011-05-05 Tom de Vries > > PR target/45098 > * tree-ssa-loop-niter.c (infer_loop_bounds_

Re: [PATCH PR45098, 7/10] Nowrap limits iterations

2011-05-20 Thread Tom de Vries
On 05/18/2011 11:11 PM, Zdenek Dvorak wrote: > 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 >> >> PR target/45098 >> * tree-ssa-loop-ivopts.c (struct ivopts_data): Add fi

Re: [PATCH PR45098, 7/10] Nowrap limits iterations

2011-05-18 Thread Zdenek Dvorak
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 > > PR target/45098 > * tree-ssa-loop-ivopts.c (struct ivopts_data): Add fields > max_iterations_p and max_iterations. >