diff options
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 99e97d6..0472239 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -1927,25 +1927,26 @@ equiv_class_hasher::equal (const value_type *eql1, const compare_type *eql2) /* A hashtable for mapping a bitmap of labels->pointer equivalence classes. */ -static hash_table <equiv_class_hasher> pointer_equiv_class_table; +static hash_table<equiv_class_hasher> *pointer_equiv_class_table; /* A hashtable for mapping a bitmap of labels->location equivalence classes. */ -static hash_table <equiv_class_hasher> location_equiv_class_table; +static hash_table<equiv_class_hasher> *location_equiv_class_table; /* Lookup a equivalence class in TABLE by the bitmap of LABELS with hash HAS it contains. Sets *REF_LABELS to the bitmap LABELS is equivalent to. */ static equiv_class_label * -equiv_class_lookup_or_add (hash_table <equiv_class_hasher> table, bitmap labels) +equiv_class_lookup_or_add (hash_table<equiv_class_hasher> *table, + bitmap labels) { equiv_class_label **slot; equiv_class_label ecl; ecl.labels = labels; ecl.hashcode = bitmap_hash (labels); - slot = table.find_slot_with_hash (&ecl, ecl.hashcode, INSERT); + slot = table->find_slot (&ecl, INSERT); if (!*slot) { *slot = XNEW (struct equiv_class_label); @@ -2281,8 +2282,9 @@ perform_var_substitution (constraint_graph_t graph) struct scc_info *si = init_scc_info (size); bitmap_obstack_initialize (&iteration_obstack); - pointer_equiv_class_table.create (511); - location_equiv_class_table.create (511); + pointer_equiv_class_table = new hash_table<equiv_class_hasher> (511); + location_equiv_class_table + = new hash_table<equiv_class_hasher> (511); pointer_equiv_class = 1; location_equiv_class = 1; @@ -2415,8 +2417,10 @@ free_var_substitution_info (struct scc_info *si) free (graph->points_to); free (graph->eq_rep); sbitmap_free (graph->direct_nodes); - pointer_equiv_class_table.dispose (); - location_equiv_class_table.dispose (); + delete pointer_equiv_class_table; + pointer_equiv_class_table = NULL; + delete location_equiv_class_table; + location_equiv_class_table = NULL; bitmap_obstack_release (&iteration_obstack); } @@ -5974,7 +5978,7 @@ shared_bitmap_hasher::equal (const value_type *sbi1, const compare_type *sbi2) /* Shared_bitmap hashtable. */ -static hash_table <shared_bitmap_hasher> shared_bitmap_table; +static hash_table<shared_bitmap_hasher> *shared_bitmap_table; /* Lookup a bitmap in the shared bitmap hashtable, and return an already existing instance if there is one, NULL otherwise. */ @@ -5988,8 +5992,7 @@ shared_bitmap_lookup (bitmap pt_vars) sbi.pt_vars = pt_vars; sbi.hashcode = bitmap_hash (pt_vars); - slot = shared_bitmap_table.find_slot_with_hash (&sbi, sbi.hashcode, - NO_INSERT); + slot = shared_bitmap_table->find_slot (&sbi, NO_INSERT); if (!slot) return NULL; else @@ -6008,7 +6011,7 @@ shared_bitmap_add (bitmap pt_vars) sbi->pt_vars = pt_vars; sbi->hashcode = bitmap_hash (pt_vars); - slot = shared_bitmap_table.find_slot_with_hash (sbi, sbi->hashcode, INSERT); + slot = shared_bitmap_table->find_slot (sbi, INSERT); gcc_assert (!*slot); *slot = sbi; } @@ -6682,7 +6685,7 @@ init_alias_vars (void) call_stmt_vars = pointer_map_create (); memset (&stats, 0, sizeof (stats)); - shared_bitmap_table.create (511); + shared_bitmap_table = new hash_table<shared_bitmap_hasher> (511); init_base_vars (); gcc_obstack_init (&fake_var_decl_obstack); @@ -6930,7 +6933,8 @@ delete_points_to_sets (void) { unsigned int i; - shared_bitmap_table.dispose (); + delete shared_bitmap_table; + shared_bitmap_table = NULL; if (dump_file && (dump_flags & TDF_STATS)) fprintf (dump_file, "Points to sets created:%d\n", stats.points_to_sets_created); |