aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authorTrevor Saunders <tsaunders@mozilla.com>2014-06-24 13:21:35 +0000
committerTrevor Saunders <tbsaunde@gcc.gnu.org>2014-06-24 13:21:35 +0000
commitc203e8a73b2f12a1da52a16a0c4a50e62b42445b (patch)
treeb8d7f5b21a14b16949ddbc5dcaeb5f2b2654d63a /gcc/tree-ssa-structalias.c
parentfbc2a724d481bb5c205baeaaa955533451226d01 (diff)
downloadgcc-c203e8a73b2f12a1da52a16a0c4a50e62b42445b.zip
gcc-c203e8a73b2f12a1da52a16a0c4a50e62b42445b.tar.gz
gcc-c203e8a73b2f12a1da52a16a0c4a50e62b42445b.tar.bz2
Remove a layer of indirection from hash_table
gcc/ * hash-table.h: Remove a layer of indirection from hash_table so that it contains the hash table's data instead of a pointer to the data. * alloc-pool.c, asan.c, attribs.c, bitmap.c, cfg.c, config/arm/arm.c, config/i386/winnt.c, config/ia64/ia64.c, config/mips/mips.c, config/sol2.c, coverage.c, cselib.c, data-streamer-out.c, dse.c, dwarf2cfi.c, dwarf2out.c, except.c, fold-const.c, gcse.c, ggc-common.c, gimple-ssa-strength-reduction.c, gimplify.c, graphite-clast-to-gimple.c, graphite-dependences.c, graphite-htab.h, graphite.c, haifa-sched.c, ipa-devirt.c, ipa-profile.c, ira-color.c, ira-costs.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lto-streamer-in.c, lto-streamer-out.c, lto-streamer.c, lto-streamer.h, passes.c, plugin.c, postreload-gcse.c, sese.c, statistics.c, store-motion.c, trans-mem.c, tree-browser.c, tree-cfg.c, tree-complex.c, tree-eh.c, tree-into-ssa.c, tree-parloops.c, tree-sra.c, tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-dom.c, tree-ssa-live.c, tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-phiopt.c, tree-ssa-pre.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-ssa-strlen.c, tree-ssa-structalias.c, tree-ssa-tail-merge.c, tree-ssa-threadupdate.c, tree-ssa-uncprop.c, tree-vect-data-refs.c, tree-vect-loop.c, tree-vectorizer.c, tree-vectorizer.h, valtrack.c, valtrack.h, var-tracking.c, vtable-verify.c, vtable-verify.h: Adjust. gcc/c/ * c-decl.c: Adjust. gcc/cp/ * class.c, semantics.c, tree.c, vtable-class-hierarchy.c: Adjust. gcc/java/ * jcf-io.c: Adjust. gcc/lto/ * lto.c: Adjust. gcc/objc/ * objc-act.c: Adjust. From-SVN: r211936
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r--gcc/tree-ssa-structalias.c32
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);