diff options
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 4ab36d0..c0ae7cc 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "coretypes.h" #include "tree.h" #include "expr.h" +#include "hash-set.h" #include "pointer-set.h" #include "hash-table.h" #include "basic-block.h" @@ -134,7 +135,7 @@ struct gimplify_omp_ctx { struct gimplify_omp_ctx *outer_context; splay_tree variables; - struct pointer_set_t *privatized_types; + hash_set<tree> *privatized_types; location_t location; enum omp_clause_default_kind default_kind; enum omp_region_type region_type; @@ -352,7 +353,7 @@ new_omp_context (enum omp_region_type region_type) c = XCNEW (struct gimplify_omp_ctx); c->outer_context = gimplify_omp_ctxp; c->variables = splay_tree_new (splay_tree_compare_decl_uid, 0, 0); - c->privatized_types = pointer_set_create (); + c->privatized_types = new hash_set<tree>; c->location = input_location; c->region_type = region_type; if ((region_type & ORT_TASK) == 0) @@ -369,7 +370,7 @@ static void delete_omp_context (struct gimplify_omp_ctx *c) { splay_tree_delete (c->variables); - pointer_set_destroy (c->privatized_types); + delete c->privatized_types; XDELETE (c); } @@ -744,7 +745,7 @@ mostly_copy_tree_r (tree *tp, int *walk_subtrees, void *data) copy their subtrees if we can make sure to do it only once. */ if (code == SAVE_EXPR || code == TARGET_EXPR || code == BIND_EXPR) { - if (data && !pointer_set_insert ((struct pointer_set_t *)data, t)) + if (data && !((hash_set<tree> *)data)->add (t)) ; else *walk_subtrees = 0; @@ -829,15 +830,14 @@ unshare_body (tree fndecl) struct cgraph_node *cgn = cgraph_node::get (fndecl); /* If the language requires deep unsharing, we need a pointer set to make sure we don't repeatedly unshare subtrees of unshareable nodes. */ - struct pointer_set_t *visited - = lang_hooks.deep_unsharing ? pointer_set_create () : NULL; + hash_set<tree> *visited + = lang_hooks.deep_unsharing ? new hash_set<tree> : NULL; copy_if_shared (&DECL_SAVED_TREE (fndecl), visited); copy_if_shared (&DECL_SIZE (DECL_RESULT (fndecl)), visited); copy_if_shared (&DECL_SIZE_UNIT (DECL_RESULT (fndecl)), visited); - if (visited) - pointer_set_destroy (visited); + delete visited; if (cgn) for (cgn = cgn->nested; cgn; cgn = cgn->next_nested) @@ -1733,7 +1733,7 @@ gimplify_conversion (tree *expr_p) } /* Nonlocal VLAs seen in the current function. */ -static struct pointer_set_t *nonlocal_vlas; +static hash_set<tree> *nonlocal_vlas; /* The VAR_DECLs created for nonlocal VLAs for debug info purposes. */ static tree nonlocal_vla_vars; @@ -1784,7 +1784,7 @@ gimplify_var_or_parm_decl (tree *expr_p) && (ctx->region_type == ORT_WORKSHARE || ctx->region_type == ORT_SIMD)) ctx = ctx->outer_context; - if (!ctx && !pointer_set_insert (nonlocal_vlas, decl)) + if (!ctx && !nonlocal_vlas->add (decl)) { tree copy = copy_node (decl); @@ -5463,7 +5463,7 @@ omp_firstprivatize_type_sizes (struct gimplify_omp_ctx *ctx, tree type) return; type = TYPE_MAIN_VARIANT (type); - if (pointer_set_insert (ctx->privatized_types, type)) + if (ctx->privatized_types->add (type)) return; switch (TREE_CODE (type)) @@ -8766,7 +8766,7 @@ gimplify_body (tree fndecl, bool do_parms) cgn = cgraph_node::get (fndecl); if (cgn && cgn->origin) - nonlocal_vlas = pointer_set_create (); + nonlocal_vlas = new hash_set<tree>; /* Make sure input_location isn't set to something weird. */ input_location = DECL_SOURCE_LOCATION (fndecl); @@ -8830,7 +8830,7 @@ gimplify_body (tree fndecl, bool do_parms) nonlocal_vla_vars); nonlocal_vla_vars = NULL_TREE; } - pointer_set_destroy (nonlocal_vlas); + delete nonlocal_vlas; nonlocal_vlas = NULL; } |