summaryrefslogtreecommitdiff
path: root/gcc/cp/cp-gimplify.c
diff options
context:
space:
mode:
authortbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-02 11:23:49 +0000
committertbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-02 11:23:49 +0000
commit431205b753bfa26d1711e40ce478d9e92fd157da (patch)
treef0fb192e856fa98b7d91e225ff958dfcc1f602df /gcc/cp/cp-gimplify.c
parent69d7692e60d4a7c61b4d3581f3285a866ec3abb1 (diff)
downloadgcc-431205b753bfa26d1711e40ce478d9e92fd157da.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213516 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-gimplify.c')
-rw-r--r--gcc/cp/cp-gimplify.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c
index 5f5ba47848c..55d6c144dd6 100644
--- a/gcc/cp/cp-gimplify.c
+++ b/gcc/cp/cp-gimplify.c
@@ -871,7 +871,7 @@ omp_cxx_notice_variable (struct cp_genericize_omp_taskreg *omp_ctx, tree decl)
struct cp_genericize_data
{
- struct pointer_set_t *p_set;
+ hash_set<tree> *p_set;
vec<tree> bind_expr_stack;
struct cp_genericize_omp_taskreg *omp_ctx;
};
@@ -884,7 +884,7 @@ cp_genericize_r (tree *stmt_p, int *walk_subtrees, void *data)
{
tree stmt = *stmt_p;
struct cp_genericize_data *wtd = (struct cp_genericize_data *) data;
- struct pointer_set_t *p_set = wtd->p_set;
+ hash_set<tree> *p_set = wtd->p_set;
/* If in an OpenMP context, note var uses. */
if (__builtin_expect (wtd->omp_ctx != NULL, 0)
@@ -924,7 +924,7 @@ cp_genericize_r (tree *stmt_p, int *walk_subtrees, void *data)
}
/* Other than invisiref parms, don't walk the same tree twice. */
- if (pointer_set_contains (p_set, stmt))
+ if (p_set->contains (stmt))
{
*walk_subtrees = 0;
return NULL_TREE;
@@ -1220,7 +1220,7 @@ cp_genericize_r (tree *stmt_p, int *walk_subtrees, void *data)
}
}
- pointer_set_insert (p_set, *stmt_p);
+ p_set->add (*stmt_p);
return NULL;
}
@@ -1232,11 +1232,11 @@ cp_genericize_tree (tree* t_p)
{
struct cp_genericize_data wtd;
- wtd.p_set = pointer_set_create ();
+ wtd.p_set = new hash_set<tree>;
wtd.bind_expr_stack.create (0);
wtd.omp_ctx = NULL;
cp_walk_tree (t_p, cp_genericize_r, &wtd, NULL);
- pointer_set_destroy (wtd.p_set);
+ delete wtd.p_set;
wtd.bind_expr_stack.release ();
}