diff options
author | tbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-02 11:23:49 +0000 |
---|---|---|
committer | tbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-02 11:23:49 +0000 |
commit | 431205b753bfa26d1711e40ce478d9e92fd157da (patch) | |
tree | f0fb192e856fa98b7d91e225ff958dfcc1f602df /gcc/cgraph.c | |
parent | 69d7692e60d4a7c61b4d3581f3285a866ec3abb1 (diff) | |
download | gcc-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/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 52f9985694a..5a0b9033c25 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -34,6 +34,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-inline.h" #include "langhooks.h" #include "hashtab.h" +#include "hash-set.h" #include "toplev.h" #include "flags.h" #include "debug.h" @@ -2876,7 +2877,7 @@ cgraph_node::verify_node (void) { if (this_cfun->cfg) { - pointer_set_t *stmts = pointer_set_create (); + hash_set<gimple> stmts; int i; struct ipa_ref *ref = NULL; @@ -2886,13 +2887,13 @@ cgraph_node::verify_node (void) { for (gsi = gsi_start_phis (this_block); !gsi_end_p (gsi); gsi_next (&gsi)) - pointer_set_insert (stmts, gsi_stmt (gsi)); + stmts.add (gsi_stmt (gsi)); for (gsi = gsi_start_bb (this_block); !gsi_end_p (gsi); gsi_next (&gsi)) { gimple stmt = gsi_stmt (gsi); - pointer_set_insert (stmts, stmt); + stmts.add (stmt); if (is_gimple_call (stmt)) { struct cgraph_edge *e = get_edge (stmt); @@ -2936,13 +2937,12 @@ cgraph_node::verify_node (void) } } for (i = 0; iterate_reference (i, ref); i++) - if (ref->stmt && !pointer_set_contains (stmts, ref->stmt)) + if (ref->stmt && !stmts.contains (ref->stmt)) { error ("reference to dead statement"); cgraph_debug_gimple_stmt (this_cfun, ref->stmt); error_found = true; } - pointer_set_destroy (stmts); } else /* No CFG available?! */ |