Re: Unloop no longer looping loops in loop-ch

2023-04-26 Thread Richard Biener via Gcc-patches
On Wed, 26 Apr 2023, Jan Hubicka wrote: > > > - if (precise) > > > + if (precise > > > + && get_max_loop_iterations_int (loop) == 1) > > > + { > > > + if (dump_file && (dump_flags & TDF_DETAILS)) > > > + fprintf (dump_file, "Loop %d no longer loops.\n", loop->num); > > > > but m

Re: Unloop no longer looping loops in loop-ch

2023-04-26 Thread Jan Hubicka via Gcc-patches
> > - if (precise) > > + if (precise > > + && get_max_loop_iterations_int (loop) == 1) > > + { > > + if (dump_file && (dump_flags & TDF_DETAILS)) > > + fprintf (dump_file, "Loop %d no longer loops.\n", loop->num); > > but max loop iterations is 1 ...? I first check for l

Re: Unloop no longer looping loops in loop-ch

2023-04-26 Thread Richard Biener via Gcc-patches
On Tue, 25 Apr 2023, Jan Hubicka wrote: > > On 25 April 2023 17:12:50 CEST, Jan Hubicka via Gcc-patches > > wrote: > > > > + fprintf (stderr, "Bingo\n"); > > > > You forgot to remove that.. > > Do we prune Bingo in the testsuite? ;-) > Ah, thanks :) > I was curious how much I win with unl

Re: Unloop no longer looping loops in loop-ch

2023-04-25 Thread Jan Hubicka via Gcc-patches
> On 25 April 2023 17:12:50 CEST, Jan Hubicka via Gcc-patches > wrote: > > + fprintf (stderr, "Bingo\n"); > > You forgot to remove that.. > Do we prune Bingo in the testsuite? ;-) Ah, thanks :) I was curious how much I win with unlooping. Updated patch is attached... * cfgloopmani

Re: Unloop no longer looping loops in loop-ch

2023-04-25 Thread Bernhard Reutner-Fischer via Gcc-patches
On 25 April 2023 17:12:50 CEST, Jan Hubicka via Gcc-patches wrote: + fprintf (stderr, "Bingo\n"); You forgot to remove that.. Do we prune Bingo in the testsuite? ;-)

Unloop no longer looping loops in loop-ch

2023-04-25 Thread Jan Hubicka via Gcc-patches
Hi, I noticed this after adding sanity check that the upper bound on number of iterations never drop to -1. It seems to be relatively common case (happening few hundred times in testsuite and also during bootstrap) that loop-ch duplicates enough so the loop itself no longer loops. This is later d