> 
> This reduces the time spent in cgraph call-site hash by providing
> inline version of htab_hash_pointer.
> 
> Bootstrap / regtest on x86_64-unknown-linux-gnu in progress.
> 
> Ok?
> 
> Thanks,
> Richard.
> 
> 2015-03-09  Richard Biener  <rguent...@suse.de>
> 
>       PR middle-end/44563
>       * cgraph.h (struct cgraph_edge_hasher): Add hash overload
>       for compare_type.
>       * cgraph.c (cgraph_edge_hasher::hash): Inline htab_hash_pointer.
>       (cgraph_update_edge_in_call_site_hash): Use cgraph_edge_hasher::hash.
>       (cgraph_add_edge_to_call_site_hash): Likewise.
>       (cgraph_node::get_edge): Likewise.
>       (cgraph_edge::set_call_stmt): Likewise.
>       (cgraph_edge::remove_caller): Likewise.

Seems reosnable to me and patch is OK.  Since hash-map is now GGC safe, won't
it be faster to use it instead? The hash is really mapping stmts to edges, so
hash-map seems most fitting datastructure in our grand new C++ world.

Honza

Reply via email to