On Mon, Apr 16, 2012 at 9:09 AM, Jan Hubicka <hubi...@ucw.cz> wrote: > Hi, > this patch moves cgraph/varpool hashes into symbol table hashes, so the > symbol table is actually almost a symbol table ;) > Work done. > > Bootstrapped/regtested x86_64-linux. Will commit it after bit of more > testing - the assembler name handling is slipperly wrt aliases. > > Honza > > * cgraph.c (cgraph_hash, assembler_name_hash): Remove. > (hash_node, eq_node): Remove. > (cgraph_create_node): Do not handle hashtable. > (cgraph_get_node): Remove. > (cgraph_insert_node_to_hashtable): Remove. > (hash_node_by_assembler_name): Remove. > (eq_assembler_name): Remove. > (cgraph_node_for_asm): Rewrite. > (cgraph_find_replacement_node): Break out from ... > (cgraph_remove_node): ... here; do not maintain hashtables. > (change_decl_assembler_name): Remove. > (cgraph_clone_node): Do not maintain hashtables. > * cgraph.h (const_symtab_node): New typedef. > (cgraph_insert_node_to_hashtable): Remove. > (symtab_get_node, symtab_node_for_asm, > symtab_insert_node_to_hashtable): Declare. > (cgraph_find_replacement_node): Declare. > (cgraph_get_node, varpool_get_node): Turn into inlines. > (cgraph, varpool): Work sanely on NULL pointers. > (FOR_EACH_SYMBOL): New walker. > * ipa-inline-transform.c (save_inline_function_body): Use > symtab_insert_node_to_hashtable. > * symtab.c: Include ggc.h and diagnostics.h > (symtab_hash, assembler_name_hash): New static vars; > (hash_node, eq_node, hash_node_by_assembler_name, > eq_assembler_name): New. > (symtab_register_node): Update hashtables. > (symtab_insert_node_to_hashtable): New. > (symtab_unregister_node): Update hashtables. > (symtab_get_node): New. > (symtab_node_for_asm): New. > (change_decl_assembler_name): New. > * Makefile.in (symtab.o): Needs GTY. > * varpool.c (varpool_hash): Remove. > (hash_varpool_node, eq_varpool_node, varpool_get_node): Remove. > (varpool_node): Rewrite using varpool_get_node. > (varpool_remove_node): DO not maintain hashtables. > (varpool_node_for_asm); Rewrite.
This caused: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53161 -- H.J.