diff options
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 5d0a32faad6..e942aada193 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -186,7 +186,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "tree-flow.h" #include "tree-inline.h" #include "langhooks.h" -#include "hashtab.h" +#include "pointer-set.h" #include "toplev.h" #include "flags.h" #include "ggc.h" @@ -223,7 +223,7 @@ static int overall_insns; walk_tree_without_duplicates doesn't guarantee each node is visited once because it gets a new htab upon each recursive call from record_calls_1. */ -static htab_t visited_nodes; +static struct pointer_set_t *visited_nodes; static FILE *cgraph_dump_file; @@ -698,10 +698,9 @@ cgraph_create_edges (struct cgraph_node *node, tree body) { /* The nodes we're interested in are never shared, so walk the tree ignoring duplicates. */ - visited_nodes = htab_create (37, htab_hash_pointer, - htab_eq_pointer, NULL); + visited_nodes = pointer_set_create (); walk_tree (&body, record_call_1, node, visited_nodes); - htab_delete (visited_nodes); + pointer_set_destroy (visited_nodes); visited_nodes = NULL; } @@ -2288,8 +2287,7 @@ cgraph_characterize_statics_local (struct cgraph_node *fn) /* The nodes we're interested in are never shared, so walk the tree ignoring duplicates. */ - visited_nodes = htab_create (37, htab_hash_pointer, - htab_eq_pointer, NULL); + visited_nodes = pointer_set_create (); /* FIXME -- PROFILE-RESTRUCTURE: Remove creation of _decl_uid vars. */ l->statics_read_by_decl_uid = BITMAP_GGC_ALLOC (); @@ -2299,7 +2297,7 @@ cgraph_characterize_statics_local (struct cgraph_node *fn) fprintf (cgraph_dump_file, "\n local analysis of %s", cgraph_node_name (fn)); walk_tree (&DECL_SAVED_TREE (decl), scan_for_static_refs, fn, visited_nodes); - htab_delete (visited_nodes); + pointer_set_destroy (visited_nodes); visited_nodes = NULL; } |