Re: Fix loop_only_exit_p

2016-07-13 Thread Jan Hubicka
> Ah, ok. I dove into the code and that indeed seems to be the case. > > Why is that function ignoring volatiles but not volatile asms or > old-style asms? I think the only control-flow transfer asms are > allowed to make are asm gotos? You mean if (gasm *asm_stmt = dyn_cast (t)) if (gim

Re: Fix loop_only_exit_p

2016-07-13 Thread Richard Biener
On Wed, 13 Jul 2016, Jan Hubicka wrote: > > > > I'd rather not expose/change need_fake_edge_p as that has a very > > specific purpose. > > > > Why don't you simply add a call to is_ctrl_altering_stmt on the > > last stmt of the block in loop_only_exit_p? It's a waste of > > time doing stuff on

Re: Fix loop_only_exit_p

2016-07-13 Thread Jan Hubicka
> > I'd rather not expose/change need_fake_edge_p as that has a very > specific purpose. > > Why don't you simply add a call to is_ctrl_altering_stmt on the > last stmt of the block in loop_only_exit_p? It's a waste of > time doing stuff on every stmt that can only make a difference > on the las

Re: Fix loop_only_exit_p

2016-07-12 Thread Richard Biener
On Mon, 11 Jul 2016, Jan Hubicka wrote: > Hi, > while looking into loop code I noticed that loop_only_exit_p seems overly > simplistic. The purpose of this predicate is to decide whether the loop > must terminate by the exit given (so for example it is known that the number > of iteration test in