Re: [PATCH] Assert on invalid bitmap iterations

2016-10-07 Thread Richard Biener
On Fri, 7 Oct 2016, Bernd Schmidt wrote: > On 10/07/2016 01:07 PM, Richard Biener wrote: > > On Fri, 7 Oct 2016, Bernd Schmidt wrote: > > > > > Here, if necessary I'd prefer we create a to_clear bitmap and perform an > > > and_compl operation after the loop. > > > > But that's way more

Re: [PATCH] Assert on invalid bitmap iterations

2016-10-07 Thread Bernd Schmidt
On 10/07/2016 01:07 PM, Richard Biener wrote: On Fri, 7 Oct 2016, Bernd Schmidt wrote: Here, if necessary I'd prefer we create a to_clear bitmap and perform an and_compl operation after the loop. But that's way more expensive -- you allocate memory and perform an additional loop over the

Re: [PATCH] Assert on invalid bitmap iterations

2016-10-07 Thread Bernd Schmidt
On 10/07/2016 01:19 PM, Richard Biener wrote: On Fri, 7 Oct 2016, Richard Biener wrote: I think the main issue is that it is not documented what is safe to do (and what are the results) when you modify a bitmap while you are iterating over it. Does the following look ok? Sure. Bernd

Re: [PATCH] Assert on invalid bitmap iterations

2016-10-07 Thread Richard Biener
On Fri, 7 Oct 2016, Richard Biener wrote: > I think the main issue is that it is not documented what is safe to do > (and what are the results) when you modify a bitmap while you are > iterating over it. Does the following look ok? Thanks, Richard. 2016-10-07 Richard Biener

Re: [PATCH] Assert on invalid bitmap iterations

2016-10-07 Thread Richard Biener
On Fri, 7 Oct 2016, Bernd Schmidt wrote: > On 10/07/2016 09:20 AM, Richard Biener wrote: > > Index: gcc/sched-deps.c > > === > > --- gcc/sched-deps.c(revision 240829) > > +++ gcc/sched-deps.c(working copy) > > @@

Re: [PATCH] Assert on invalid bitmap iterations

2016-10-07 Thread Bernd Schmidt
On 10/07/2016 09:20 AM, Richard Biener wrote: Index: gcc/sched-deps.c === --- gcc/sched-deps.c(revision 240829) +++ gcc/sched-deps.c(working copy) @@ -3992,8 +3992,14 @@ remove_from_deps (struct deps_desc *deps removed =

Re: [PATCH] Assert on invalid bitmap iterations

2016-10-07 Thread Richard Biener
On Thu, 6 Oct 2016, Jeff Law wrote: > On 10/06/2016 03:15 AM, Richard Biener wrote: > > > > The following guards against (some) remove-current-bit cases. It > > would have ICEd for PR77855 instead of producing wrong code. > > > > Bootstrap / regtest running on x86_64-unknown-linux-gnu. > > >

Re: [PATCH] Assert on invalid bitmap iterations

2016-10-06 Thread Jeff Law
On 10/06/2016 03:15 AM, Richard Biener wrote: The following guards against (some) remove-current-bit cases. It would have ICEd for PR77855 instead of producing wrong code. Bootstrap / regtest running on x86_64-unknown-linux-gnu. Comments? Thanks, Richard. 2016-10-06 Richard Biener

Re: [PATCH] Assert on invalid bitmap iterations

2016-10-06 Thread Richard Biener
On Thu, 6 Oct 2016, Richard Biener wrote: > > The following guards against (some) remove-current-bit cases. It > would have ICEd for PR77855 instead of producing wrong code. > > Bootstrap / regtest running on x86_64-unknown-linux-gnu. > > Comments? Found one additional issue. Bootstrapped

[PATCH] Assert on invalid bitmap iterations

2016-10-06 Thread Richard Biener
The following guards against (some) remove-current-bit cases. It would have ICEd for PR77855 instead of producing wrong code. Bootstrap / regtest running on x86_64-unknown-linux-gnu. Comments? Thanks, Richard. 2016-10-06 Richard Biener * bitmap.c