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/cgraphunit.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/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 02c9fa1..acc441c 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -845,7 +845,7 @@ varpool_node::finalize_decl (tree decl) avoid udplicate work. */ static void -walk_polymorphic_call_targets (pointer_set_t *reachable_call_targets, +walk_polymorphic_call_targets (hash_set<void *> *reachable_call_targets, struct cgraph_edge *edge) { unsigned int i; @@ -855,8 +855,7 @@ walk_polymorphic_call_targets (pointer_set_t *reachable_call_targets, = possible_polymorphic_call_targets (edge, &final, &cache_token); - if (!pointer_set_insert (reachable_call_targets, - cache_token)) + if (!reachable_call_targets->add (cache_token)) { if (cgraph_dump_file) dump_possible_polymorphic_call_targets @@ -936,7 +935,7 @@ analyze_functions (void) struct cgraph_node *first_handled = first_analyzed; static varpool_node *first_analyzed_var; varpool_node *first_handled_var = first_analyzed_var; - struct pointer_set_t *reachable_call_targets = pointer_set_create (); + hash_set<void *> reachable_call_targets; symtab_node *node; symtab_node *next; @@ -1035,7 +1034,7 @@ analyze_functions (void) { next = edge->next_callee; if (edge->indirect_info->polymorphic) - walk_polymorphic_call_targets (reachable_call_targets, + walk_polymorphic_call_targets (&reachable_call_targets, edge); } } @@ -1123,7 +1122,6 @@ analyze_functions (void) symtab_node::dump_table (cgraph_dump_file); } bitmap_obstack_release (NULL); - pointer_set_destroy (reachable_call_targets); ggc_collect (); /* Initialize assembler name hash, in particular we want to trigger C++ mangling and same body alias creation before we free DECL_ARGUMENTS |