This is the mail archive of the gcc@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: speeding up parts of gcc by using ffs


Andrew Pinski <pinskia@physics.uc.edu> writes:

> A follow of the comments I received, I have only right now added the
> simple cases of HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT and
> HOST_BITS_PER_INT == HOST_BITS_PER_LONG.  I might implement the other
> part of the patch for when HOST_BITS_PER_WIDE_INT ==
> HOST_BITS_PER_LONG_LONG and HOST_BITS_PER_WIDE_INT ==
> HOST_BITS_PER_LONG but this might take some time because I have to add
> some more builtins but it will clean things up.

I'm not enthusiastic about all the #ifdefs.

glibc provides ffsl and ffsll which take 'long' and 'long long'
respectively; may I suggest that you follow these steps:

1) put ffsl and ffsll into libiberty.
2) have hwint.h #define ffs_hwi and ffs_hwidesti appropriately
3) use ffs/ffsl/ffsll/ffs_hwi throughout the compiler
4) create __builtin_ffsl and __builtin_ffsll

zw


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