This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Speed up ivopts


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]