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/tree-ssa-threadedge.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/tree-ssa-threadedge.c')
-rw-r--r-- | gcc/tree-ssa-threadedge.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c index 9807b42..3dee5ba 100644 --- a/gcc/tree-ssa-threadedge.c +++ b/gcc/tree-ssa-threadedge.c @@ -30,7 +30,7 @@ along with GCC; see the file COPYING3. If not see #include "function.h" #include "timevar.h" #include "dumpfile.h" -#include "pointer-set.h" +#include "hash-set.h" #include "tree-ssa-alias.h" #include "internal-fn.h" #include "gimple-expr.h" @@ -693,13 +693,13 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src) } auto_vec<tree, alloc_count> fewvars; - pointer_set_t *vars = NULL; + hash_set<tree> *vars = NULL; /* If we're already starting with 3/4 of alloc_count, go for a - pointer_set, otherwise start with an unordered stack-allocated + hash_set, otherwise start with an unordered stack-allocated VEC. */ if (i * 4 > alloc_count * 3) - vars = pointer_set_create (); + vars = new hash_set<tree>; /* Now go through the initial debug stmts in DEST again, this time actually inserting in VARS or FEWVARS. Don't bother checking for @@ -720,7 +720,7 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src) gcc_unreachable (); if (vars) - pointer_set_insert (vars, var); + vars->add (var); else fewvars.quick_push (var); } @@ -754,7 +754,7 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src) or somesuch. Adding `&& bb == src' to the condition below will preserve all potentially relevant debug notes. */ - if (vars && pointer_set_insert (vars, var)) + if (vars && vars->add (var)) continue; else if (!vars) { @@ -769,11 +769,11 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src) fewvars.quick_push (var); else { - vars = pointer_set_create (); + vars = new hash_set<tree>; for (i = 0; i < alloc_count; i++) - pointer_set_insert (vars, fewvars[i]); + vars->add (fewvars[i]); fewvars.release (); - pointer_set_insert (vars, var); + vars->add (var); } } @@ -786,7 +786,7 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src) while (bb != src && single_pred_p (bb)); if (vars) - pointer_set_destroy (vars); + delete vars; else if (fewvars.exists ()) fewvars.release (); } |