[RFC] Speed up htab/walk_tree?
Andrew Pinski
pinskia@physics.uc.edu
Tue Apr 6 22:24:00 GMT 2004
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.
Thanks,
Andrew Pinski
More information about the Gcc
mailing list