Re: [PATCH][RFC] Add bitmap_clear_first_set_bit for worklist handling

2018-10-16 Thread Jeff Law
On 10/16/18 3:12 AM, Richard Biener wrote: > > This adds bitmap_clear_first_set_bit to replace the common > > unsigned idx = bitmap_first_set_bit (b); > bitmap_clear_bit (b, idx); > > pattern which disturbs the bitmap lookup cached element. We can > always find and clear the first set bit i

[PATCH][RFC] Add bitmap_clear_first_set_bit for worklist handling

2018-10-16 Thread Richard Biener
This adds bitmap_clear_first_set_bit to replace the common unsigned idx = bitmap_first_set_bit (b); bitmap_clear_bit (b, idx); pattern which disturbs the bitmap lookup cached element. We can always find and clear the first set bit in O(1) so this implements this as a primitive. Alternativ