Re: Record likely upper bounds for loops

2016-05-31 Thread Bernhard Reutner-Fischer
On May 27, 2016 1:14:09 PM GMT+02:00, Jan Hubicka wrote: >+ fprintf (dump_file, "Loop likely %d iterates at most %i >times.\n", loop->num, >+ (int)likely_max_loop_iterations_int (loop)); s/Loop likely %d/Loop %d likely/ please. thanks,

Re: Record likely upper bounds for loops

2016-05-28 Thread Jan Hubicka
> Hi, > > On Fri, 27 May 2016, Jan Hubicka wrote: > > Thanks, updatted and comitted. > > This checkin seems to regress gcc.c-torture/execute/20050826-2.c at -Os: > > gcc/xgcc -Bgcc/ ../gcc/gcc/testsuite/gcc.c-torture/execute/20050826-2.c -Os \ > -o ./20050826-2.exe > > ./20050826-2.exe > Ab

Re: Record likely upper bounds for loops

2016-05-27 Thread Paolo Carlini
Hi, On 27/05/2016 19:20, Alexander Monakov wrote: Hi, On Fri, 27 May 2016, Jan Hubicka wrote: Thanks, updatted and comitted. This checkin seems to regress gcc.c-torture/execute/20050826-2.c at -Os: gcc/xgcc -Bgcc/ ../gcc/gcc/testsuite/gcc.c-torture/execute/20050826-2.c -Os \ -o ./20050826

Re: Record likely upper bounds for loops

2016-05-27 Thread Alexander Monakov
Hi, On Fri, 27 May 2016, Jan Hubicka wrote: > Thanks, updatted and comitted. This checkin seems to regress gcc.c-torture/execute/20050826-2.c at -Os: gcc/xgcc -Bgcc/ ../gcc/gcc/testsuite/gcc.c-torture/execute/20050826-2.c -Os \ -o ./20050826-2.exe ./20050826-2.exe Aborted (the previous rev

Re: Record likely upper bounds for loops

2016-05-27 Thread Jan Hubicka
> likely_max_loop_iterations misses a function comment. Thanks, updatted and comitted. > > Ugh, one more widest_int in struct loop ... (oh well). Given > that (on x86_64) sizeof(widest_int) == 40 and sizeof(tree_int_cst) == 24 > (ok, that's cheating, it's with just one HWI for the number) it lo

Re: Record likely upper bounds for loops

2016-05-27 Thread Richard Biener
On Fri, 27 May 2016, Jan Hubicka wrote: > Hi, > this patch adds infrastructure to tree-ssa-loop-niter to record likely upper > bounds. > The basic idea is that it is easier to get likely bounds that 100% safe > bounds or > realistic estimates and the bound can be effectively used to trim down >

Record likely upper bounds for loops

2016-05-27 Thread Jan Hubicka
Hi, this patch adds infrastructure to tree-ssa-loop-niter to record likely upper bounds. The basic idea is that it is easier to get likely bounds that 100% safe bounds or realistic estimates and the bound can be effectively used to trim down optimizations that are good idea only for large trip c