This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][LTO] Speed up gimple_type_hash
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Diego Novillo <dnovillo at google dot com>
- Date: Wed, 15 Jul 2009 17:21:43 +0200 (CEST)
- Subject: Re: [PATCH][LTO] Speed up gimple_type_hash
- References: <alpine.LNX.2.00.0907151602320.16347@zhemvz.fhfr.qr>
On Wed, 15 Jul 2009, Richard Guenther wrote:
>
> This patch speeds up gimple_type_hash by some big margin (down from some
> minutes on a testcase to 2 seconds). It also removes the self-referential
> type limits - which may be the cause for the extra FAILs I get.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu gets me
...
> I still have to investigate what is going wrong here - all errors seem
> to be type verification issues, so I guess sth doesn't work right here
> and we fail to unify things properly.
Obviously the following is completely bogus (where did I C&P that from?)
> + if ((slot = pointer_map_contains (type_hash_cache, type)) != NULL)
> + return iterative_hash_hashval_t (TREE_ADDRESSABLE (type),
> + (hashval_t) (size_t) *slot);
It should be
if ((slot = pointer_map_contains (type_hash_cache, type)) != NULL)
return (hashval_t) (size_t) *slot;
I'm re-testing with that.
Ok for lto if it works out and regresses nothing?
Thanks,
Richard.