[RFC] Speed up htab/walk_tree?
Richard Guenther
rguenth@tat.physik.uni-tuebingen.de
Wed Apr 7 07:50:00 GMT 2004
On Tue, 6 Apr 2004, Andrew Pinski wrote:
>
> On Apr 6, 2004, at 15:42, Richard Guenther wrote:
> >
> > Thanks,
> > Richard.
> > --- /home/rguenth/src/gcc/gccssa/gcc/tree-inline.c 2004-03-29
> > 10:54:31.000000000 +0200
> > +++ gcc/tree-inline.c 2004-04-06 19:39:43.788564736 +0200
> > @@ -1971,7 +1971,13 @@
> >
> > /* Don't walk the same tree twice, if the user has requested
> > that we avoid doing so. */
> > - slot = htab_find_slot (htab, *tp, INSERT);
> > + hashval_t hash = ((long)*tp >> 3);
> > + unsigned int index = hash % htab->size;
>
>
> The other thing to check is do with the profilebootstrap as most likely
> htab->size
> is going to be a power of 2. This might be able to get better timings.
No, htab->size is always prime. Only for better branch prediction
profiledbootstrap will help. But profiledbootstrap is broken on ia64.
Richard.
--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/
More information about the Gcc
mailing list