aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-nested.c
diff options
context:
space:
mode:
authorGabriel Dos Reis <gdr@integrable-solutions.net>2005-12-18 09:26:53 +0000
committerGabriel Dos Reis <gdr@gcc.gnu.org>2005-12-18 09:26:53 +0000
commite1111e8ebebd06ab2fcd02f9698d2ff90697a1b6 (patch)
treeb0e3f4d4a33eade27493478449c582c899ee90e8 /gcc/tree-nested.c
parenta1bdf726b709f7f6b70f391680a050f32b6e47ff (diff)
downloadgcc-e1111e8ebebd06ab2fcd02f9698d2ff90697a1b6.zip
gcc-e1111e8ebebd06ab2fcd02f9698d2ff90697a1b6.tar.gz
gcc-e1111e8ebebd06ab2fcd02f9698d2ff90697a1b6.tar.bz2
tree-tailcall.c (find_tail_calls): Use XNEW.
* tree-tailcall.c (find_tail_calls): Use XNEW. * tree-ssa-dom.c (allocate_edge_info): Use XCNEW. (free_all_edge_infos): Use explicit cast to convert from void * *. (vrp_free): Likewise. (dom_opt_finalize_block): Likewise. (record_equivalences_from_incoming_edge): Likewise. (thread_across_edge): Likewise. Use XCNEWVEC. (record_cond): Use XCNEW. (record_conditions): Use XNEWVEC. (record_edge_info): Use XCNEWVEC. (lookup_avail_expr): Use XNEW. (record_range): Likewise. Use GGC_NEW. * tree-nested.c (var_map_hash): Use explicit cast to convert * from void *. (var_map_eq): Likewise. (lookup_field_for_decl): Likewise. (convert_nonlocal_reference): Likewise. (convert_local_reference): Likewise. (convert_nl_goto_reference): Likewise. (convert_nl_goto_receiver): Likewise. (convert_call_expr): Likewise. (convert_tramp_reference): Likewise. (lookup_tramp_for_decl): Likewise.Use GGC_NEW. (convert_nl_goto_reference): Likewise. (lookup_field_for_decl): Use GGC_NEW. (create_nesting_tree): Use GGC_CNEW. * tree-ssa-phiopt.c (blocks_in_phiopt_order): Use XNEWVEC. * tree-ssa-alias.c (init_alias_info): Use XCNEW. (create_alias_map_for): Likewise. (setup_pointers_and_addressables): Use XCNEWVEC. (get_ptr_info): Use GGC_NEW. (used_part_map_eq): Use explicit cast to convert from void *. (up_lookup): Likewise. (up_insert): Use XNEW. (get_or_create_used_part_for): Use XCNEW. (get_tmt_for): Likewise. * tree-ssa-operands.c (ssa_operand_alloc): Use GGC_NEW. * tree-ssa-pre.c (phi_trans_add): Use XNEW. (bitmap_set_new): Use explicit cast to convert from void *. (set_new): Likewise. (insert_into_set): Likewise. (pool_copy_list): Likewise. (phi_translate): Likewise. (create_value_expr_from): Likewise. (insert_aux): Use XCNEWVEC. (compute_avail): Use XNEWVEC. * tree-ssa-live.c (calculate_live_on_entry): Likewise. (sort_coalesce_list): Likewise. (build_tree_conflict_graph): Use XCNEWVEC. * tree-ssa-dce.c (tree_dce_init): Use XNEWVEC. * tree-ssa-copy.c (init_copy_prop): Likewise. (fini_copy_prop): Likewise. * tree-ssa-uncprop.c (associate_equivalences_with_edges): Use * XNEW and XCNEWVEC. (record_equiv): Use XNEW. (uncprop_into_successor_phis): Use explicit cast to convert * from void *. (uncprop_initialize_block): Likewise. From-SVN: r108747
Diffstat (limited to 'gcc/tree-nested.c')
-rw-r--r--gcc/tree-nested.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c
index a4bda9f..d5309ec 100644
--- a/gcc/tree-nested.c
+++ b/gcc/tree-nested.c
@@ -108,15 +108,15 @@ struct nesting_info GTY ((chain_next ("%h.next")))
static hashval_t
var_map_hash (const void *x)
{
- const struct var_map_elt *a = x;
+ const struct var_map_elt *a = (const struct var_map_elt *) x;
return htab_hash_pointer (a->old);
}
static int
var_map_eq (const void *x, const void *y)
{
- const struct var_map_elt *a = x;
- const struct var_map_elt *b = y;
+ const struct var_map_elt *a = (const struct var_map_elt *) x;
+ const struct var_map_elt *b = (const struct var_map_elt *) y;
return a->old == b->old;
}
@@ -270,7 +270,7 @@ lookup_field_for_decl (struct nesting_info *info, tree decl,
gcc_assert (insert != INSERT);
return NULL;
}
- elt = *slot;
+ elt = (struct var_map_elt *) *slot;
if (!elt && insert == INSERT)
{
@@ -296,7 +296,7 @@ lookup_field_for_decl (struct nesting_info *info, tree decl,
insert_field_into_struct (get_frame_type (info), field);
- elt = ggc_alloc (sizeof (*elt));
+ elt = GGC_NEW (struct var_map_elt);
elt->old = decl;
elt->new = field;
*slot = elt;
@@ -471,7 +471,7 @@ lookup_tramp_for_decl (struct nesting_info *info, tree decl,
gcc_assert (insert != INSERT);
return NULL;
}
- elt = *slot;
+ elt = (struct var_map_elt *) *slot;
if (!elt && insert == INSERT)
{
@@ -482,7 +482,7 @@ lookup_tramp_for_decl (struct nesting_info *info, tree decl,
insert_field_into_struct (get_frame_type (info), field);
- elt = ggc_alloc (sizeof (*elt));
+ elt = GGC_NEW (struct var_map_elt);
elt->old = decl;
elt->new = field;
*slot = elt;
@@ -706,7 +706,7 @@ check_for_nested_with_variably_modified (tree fndecl, tree orig_fndecl)
static struct nesting_info *
create_nesting_tree (struct cgraph_node *cgn)
{
- struct nesting_info *info = ggc_calloc (1, sizeof (*info));
+ struct nesting_info *info = GGC_CNEW (struct nesting_info);
info->var_map = htab_create_ggc (7, var_map_hash, var_map_eq, ggc_free);
info->context = cgn->decl;
@@ -805,7 +805,7 @@ get_frame_field (struct nesting_info *info, tree target_context,
static tree
convert_nonlocal_reference (tree *tp, int *walk_subtrees, void *data)
{
- struct walk_stmt_info *wi = data;
+ struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
struct nesting_info *info = wi->info;
tree t = *tp;
@@ -955,7 +955,7 @@ convert_nonlocal_reference (tree *tp, int *walk_subtrees, void *data)
static tree
convert_local_reference (tree *tp, int *walk_subtrees, void *data)
{
- struct walk_stmt_info *wi = data;
+ struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
struct nesting_info *info = wi->info;
tree t = *tp, field, x;
bool save_val_only;
@@ -1086,7 +1086,7 @@ convert_local_reference (tree *tp, int *walk_subtrees, void *data)
static tree
convert_nl_goto_reference (tree *tp, int *walk_subtrees, void *data)
{
- struct walk_stmt_info *wi = data;
+ struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
struct nesting_info *info = wi->info, *i;
tree t = *tp, label, new_label, target_context, x, arg, field;
struct var_map_elt *elt, dummy;
@@ -1114,13 +1114,13 @@ convert_nl_goto_reference (tree *tp, int *walk_subtrees, void *data)
can insert the new label into the IL during a second pass. */
dummy.old = label;
slot = htab_find_slot (i->var_map, &dummy, INSERT);
- elt = *slot;
+ elt = (struct var_map_elt *) *slot;
if (elt == NULL)
{
new_label = create_artificial_label ();
DECL_NONLOCAL (new_label) = 1;
- elt = ggc_alloc (sizeof (*elt));
+ elt = GGC_NEW (struct var_map_elt);
elt->old = label;
elt->new = new_label;
*slot = elt;
@@ -1154,7 +1154,7 @@ convert_nl_goto_reference (tree *tp, int *walk_subtrees, void *data)
static tree
convert_nl_goto_receiver (tree *tp, int *walk_subtrees, void *data)
{
- struct walk_stmt_info *wi = data;
+ struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
struct nesting_info *info = wi->info;
tree t = *tp, label, new_label, x;
struct var_map_elt *elt, dummy;
@@ -1166,7 +1166,7 @@ convert_nl_goto_receiver (tree *tp, int *walk_subtrees, void *data)
label = LABEL_EXPR_LABEL (t);
dummy.old = label;
- elt = htab_find (info->var_map, &dummy);
+ elt = (struct var_map_elt *) htab_find (info->var_map, &dummy);
if (!elt)
return NULL_TREE;
new_label = elt->new;
@@ -1193,7 +1193,7 @@ convert_nl_goto_receiver (tree *tp, int *walk_subtrees, void *data)
static tree
convert_tramp_reference (tree *tp, int *walk_subtrees, void *data)
{
- struct walk_stmt_info *wi = data;
+ struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
struct nesting_info *info = wi->info, *i;
tree t = *tp, decl, target_context, x, arg;
@@ -1268,7 +1268,7 @@ convert_tramp_reference (tree *tp, int *walk_subtrees, void *data)
static tree
convert_call_expr (tree *tp, int *walk_subtrees, void *data)
{
- struct walk_stmt_info *wi = data;
+ struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
struct nesting_info *info = wi->info;
tree t = *tp, decl, target_context;