[patch] Speed up ivopts

Richard Henderson rth@redhat.com
Mon Nov 8 19:20:00 GMT 2004


On Sat, Nov 06, 2004 at 09:53:53PM +0100, Zdenek Dvorak wrote:
> ! static const unsigned nzb_tab[] =

This is not ok.  At minimum you can put this out of line.  But as for
how to use __builtin_ctz, see the use of __builtin_clz in toplev.h.

> + /* Advance to the next nonzero bit in the intersection of
> +    complemented bitmaps.  We will have already advanced past the just
> +    iterated bit.  */
> + 
> + static inline bool
> + bmp_iter_and_compl (bitmap_iterator *bi, unsigned *bit_no)
> + {
> +   if (bi->bits)
> +     {
> +       bmp_iter_advance (bi, bit_no);
> +       return true;
> +     }
> +   return bmp_iter_and_compl_1 (bi, bit_no);

With the bits-in-word part factored out and inlined, does it make
sense to move bmp_iter_and_compl_1 (etc) out of line?

The actual iv parts look ok.


r~



More information about the Gcc-patches mailing list