Re: [PATCH] Fix PR55833 + cheaper checking

2013-01-15 Thread Zdenek Dvorak
Hi, > > Yes, you should check whether you are in an irreducible loop. This is done > > by > > testing EDGE_IRREDUCIBLE_LOOP flag, > > Alright, I was wondering whether there's any other way. Unfortunately, > here I couldn't do something like > > if (loop_preheader_edge (loop)->flags & EDGE_IRR

Re: [PATCH] Fix PR55833 + cheaper checking

2013-01-14 Thread Marek Polacek
On Mon, Jan 14, 2013 at 06:51:54PM +0100, Zdenek Dvorak wrote: > Hi, > > > On Thu, Jan 10, 2013 at 11:19:43PM +0100, Zdenek Dvorak wrote: > > > I agree -- at the very least, unswitch_single_loop should check whether > > > there > > > is any possiblity it could have affected irreducible loops info

Re: [PATCH] Fix PR55833 + cheaper checking

2013-01-14 Thread Zdenek Dvorak
Hi, > On Thu, Jan 10, 2013 at 11:19:43PM +0100, Zdenek Dvorak wrote: > > I agree -- at the very least, unswitch_single_loop should check whether > > there > > is any possiblity it could have affected irreducible loops information (this > > should only be the case when some already existing irredu

Re: [PATCH] Fix PR55833 + cheaper checking

2013-01-14 Thread Marek Polacek
On Thu, Jan 10, 2013 at 11:19:43PM +0100, Zdenek Dvorak wrote: > I agree -- at the very least, unswitch_single_loop should check whether there > is any possiblity it could have affected irreducible loops information (this > should only be the case when some already existing irreducible loop is alte

Re: [PATCH] Fix PR55833 + cheaper checking

2013-01-10 Thread Zdenek Dvorak
Hi, > On Thu, Jan 10, 2013 at 6:31 PM, Marek Polacek wrote: > > + /* We changed the CFG. Recompute irreducible BBs and edges. */ > > + mark_irreducible_loops (); > > This is a very expensive fix for a really unusual situation. > > I don't think this is the right thing to do... I agree -- at

Re: [PATCH] Fix PR55833 + cheaper checking

2013-01-10 Thread Steven Bosscher
On Thu, Jan 10, 2013 at 6:31 PM, Marek Polacek wrote: > + /* We changed the CFG. Recompute irreducible BBs and edges. */ > + mark_irreducible_loops (); This is a very expensive fix for a really unusual situation. I don't think this is the right thing to do... Ciao! Steven

[PATCH] Fix PR55833 + cheaper checking

2013-01-10 Thread Marek Polacek
The following patch fixes (?) PR55833 by recomputing irreducible loops after every unswitch-transformation. With this testcase, when we perform loop unswitching on the RTL level, we end up in situation where we have a loop into which we get through loop exit of another loop which is a part of an i