aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa.c
diff options
context:
space:
mode:
authorTrevor Saunders <tsaunders@mozilla.com>2014-10-12 22:22:53 +0000
committerTrevor Saunders <tbsaunde@gcc.gnu.org>2014-10-12 22:22:53 +0000
commit2a22f99cb12d82712dd93cfef808b1cef543601b (patch)
treec828063f153ceb609ce5c7d44ea9f00391b32950 /gcc/tree-ssa.c
parent7b262a51ea2310bdb6cc901de00f04b0e7be0a4e (diff)
downloadgcc-2a22f99cb12d82712dd93cfef808b1cef543601b.zip
gcc-2a22f99cb12d82712dd93cfef808b1cef543601b.tar.gz
gcc-2a22f99cb12d82712dd93cfef808b1cef543601b.tar.bz2
move many gc hashtab to hash_table
gcc/ * asan.c, cfgloop.c, cfgloop.h, cgraph.c, cgraph.h, config/darwin.c, config/m32c/m32c.c, config/mep/mep.c, config/mips/mips.c, config/rs6000/rs6000.c, dwarf2out.c, function.c, function.h, gimple-ssa.h, libfuncs.h, optabs.c, output.h, rtl.h, sese.c, symtab.c, tree-cfg.c, tree-dfa.c, tree-ssa.c, varasm.c: Use hash-table instead of hashtab. * doc/gty.texi (for_user): Document new option. * gengtype.c (create_user_defined_type): Don't try to get a struct for char. (walk_type): Don't error out on for_user option. (write_func_for_structure): Emit user marking routines if requested by for_user option. (write_local_func_for_structure): Likewise. (main): Mark types with for_user option as used. * ggc.h (gt_pch_nx): Add overload for unsigned int. * hash-map.h (hash_map::hash_entry::pch_nx_helper): AddOverloads. * hash-table.h (ggc_hasher): New struct. (hash_table::create_ggc): New function. (gt_pch_nx): New overload for hash_table. java/ * class.c, decl.c, except.c, expr.c, java-tree.h, lang.c: Use hash_table instead of hashtab. objc/ * objc-act.c: use hash_table instead of hashtab. cp/ * cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c, pt.c, semantics.c, tree.c, typeck2.c: Use hash_table instead of hashtab. fortran/ * trans-decl.c, trans.c, trans.h: Use hash_table instead of hashtab. c-family/ * c-common.c: Use hash_table instead of hashtab. From-SVN: r216127
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r--gcc/tree-ssa.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index b6b3718..f05db17 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -1055,24 +1055,6 @@ err:
internal_error ("verify_ssa failed");
}
-/* Return true if the DECL_UID in both trees are equal. */
-
-static int
-uid_ssaname_map_eq (const void *va, const void *vb)
-{
- const_tree a = (const_tree) va;
- const_tree b = (const_tree) vb;
- return (a->ssa_name.var->decl_minimal.uid == b->ssa_name.var->decl_minimal.uid);
-}
-
-/* Hash a tree in a uid_decl_map. */
-
-static unsigned int
-uid_ssaname_map_hash (const void *item)
-{
- return ((const_tree)item)->ssa_name.var->decl_minimal.uid;
-}
-
/* Initialize global DFA and SSA structures. */
@@ -1080,8 +1062,7 @@ void
init_tree_ssa (struct function *fn)
{
fn->gimple_df = ggc_cleared_alloc<gimple_df> ();
- fn->gimple_df->default_defs = htab_create_ggc (20, uid_ssaname_map_hash,
- uid_ssaname_map_eq, NULL);
+ fn->gimple_df->default_defs = hash_table<ssa_name_hasher>::create_ggc (20);
pt_solution_reset (&fn->gimple_df->escaped);
init_ssanames (fn, 0);
}
@@ -1153,7 +1134,7 @@ delete_tree_ssa (void)
if (ssa_operands_active (cfun))
fini_ssa_operands (cfun);
- htab_delete (cfun->gimple_df->default_defs);
+ cfun->gimple_df->default_defs->empty ();
cfun->gimple_df->default_defs = NULL;
pt_solution_reset (&cfun->gimple_df->escaped);
if (cfun->gimple_df->decls_to_pointers != NULL)