diff options
author | Trevor Saunders <tsaunders@mozilla.com> | 2014-08-02 11:23:49 +0000 |
---|---|---|
committer | Trevor Saunders <tbsaunde@gcc.gnu.org> | 2014-08-02 11:23:49 +0000 |
commit | 6e2830c3dbe0d4972519ddd44bd1b15b2b274ba2 (patch) | |
tree | f0fb192e856fa98b7d91e225ff958dfcc1f602df /gcc/cfgexpand.c | |
parent | 2df06cec0a2fe611c5487bf54c4ef8e3b2b30543 (diff) | |
download | gcc-6e2830c3dbe0d4972519ddd44bd1b15b2b274ba2.zip gcc-6e2830c3dbe0d4972519ddd44bd1b15b2b274ba2.tar.gz gcc-6e2830c3dbe0d4972519ddd44bd1b15b2b274ba2.tar.bz2 |
add a hash_set based on hash_table
This allows us to replace the usage of pointer_set outside of
pointer_map with a nicer interface.
gcc/ada/
* gcc-interface/trans.c: Use hash_set instead of pointer_set.
gcc/c-family/
* c-gimplify.c: Use hash_set instead of pointer_set.
gcc/c/
* c-decl.c: Use hash_set instead of pointer_set.
gcc/cp/
* class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c,
method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set
instead of pointer_set.
gcc/fortran/
* openmp.c, trans-decl.c: Use hash_set instead of pointer_set.
gcc/
* hash-set.h: new File.
* cfgexpand.c, cfgloop.c, cgraph.c, cgraphbuild.c, cgraphunit.c,
cprop.c, cse.c, gimple-walk.c, gimple-walk.h, gimplify.c, godump.c,
ipa-devirt.c, ipa-pure-const.c, ipa-visibility.c, ipa.c, lto-cgraph.c,
lto-streamer-out.c, stmt.c, tree-cfg.c, tree-core.h, tree-eh.c,
tree-inline.c, tree-inline.h, tree-nested.c, tree-pretty-print.c,
tree-ssa-loop-niter.c, tree-ssa-phiopt.c, tree-ssa-threadedge.c,
tree-ssa-uninit.c, tree.c, tree.h, value-prof.c, varasm.c,
varpool.c: Use hash_set instead of pointer_set.
gcc/lto/
* lto-partition.c, lto-partition.h: Use hash_set instead of
pointer_set.
From-SVN: r213516
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 2f0ae71..b20be10 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -35,6 +35,7 @@ along with GCC; see the file COPYING3. If not see #include "expr.h" #include "langhooks.h" #include "bitmap.h" +#include "hash-set.h" #include "pointer-set.h" #include "tree-ssa-alias.h" #include "internal-fn.h" @@ -594,7 +595,7 @@ stack_var_cmp (const void *a, const void *b) static void add_partitioned_vars_to_ptset (struct pt_solution *pt, struct pointer_map_t *decls_to_partitions, - struct pointer_set_t *visited, bitmap temp) + hash_set<bitmap> *visited, bitmap temp) { bitmap_iterator bi; unsigned i; @@ -604,7 +605,7 @@ add_partitioned_vars_to_ptset (struct pt_solution *pt, || pt->vars == NULL /* The pointed-to vars bitmap is shared, it is enough to visit it once. */ - || pointer_set_insert (visited, pt->vars)) + || visited->add (pt->vars)) return; bitmap_clear (temp); @@ -684,7 +685,7 @@ update_alias_info_with_stack_vars (void) if (decls_to_partitions) { unsigned i; - struct pointer_set_t *visited = pointer_set_create (); + hash_set<bitmap> visited; bitmap temp = BITMAP_ALLOC (&stack_var_bitmap_obstack); for (i = 1; i < num_ssa_names; i++) @@ -696,13 +697,12 @@ update_alias_info_with_stack_vars (void) && POINTER_TYPE_P (TREE_TYPE (name)) && ((pi = SSA_NAME_PTR_INFO (name)) != NULL)) add_partitioned_vars_to_ptset (&pi->pt, decls_to_partitions, - visited, temp); + &visited, temp); } add_partitioned_vars_to_ptset (&cfun->gimple_df->escaped, - decls_to_partitions, visited, temp); + decls_to_partitions, &visited, temp); - pointer_set_destroy (visited); pointer_map_destroy (decls_to_partitions); BITMAP_FREE (temp); } |