summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-alias.c
diff options
context:
space:
mode:
authorgdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-18 09:26:53 +0000
committergdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-18 09:26:53 +0000
commit945865c5ef9259023618ab6c3108dc8adb543e1e (patch)
treeb0e3f4d4a33eade27493478449c582c899ee90e8 /gcc/tree-ssa-alias.c
parentcc8ac6b5ceb97b9f85ed75766c0f7315b6a77462 (diff)
downloadgcc-945865c5ef9259023618ab6c3108dc8adb543e1e.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108747 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r--gcc/tree-ssa-alias.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index d7d11c11278..76ede774445 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -455,7 +455,7 @@ init_alias_info (void)
tree var;
bitmap_obstack_initialize (&alias_obstack);
- ai = xcalloc (1, sizeof (struct alias_info));
+ ai = XCNEW (struct alias_info);
ai->ssa_names_visited = sbitmap_alloc (num_ssa_names);
sbitmap_zero (ai->ssa_names_visited);
VARRAY_TREE_INIT (ai->processed_ptrs, 50, "processed_ptrs");
@@ -1148,7 +1148,7 @@ static void
create_alias_map_for (tree var, struct alias_info *ai)
{
struct alias_map_d *alias_map;
- alias_map = xcalloc (1, sizeof (*alias_map));
+ alias_map = XCNEW (struct alias_map_d);
alias_map->var = var;
alias_map->set = get_alias_set (var);
ai->addressable_vars[ai->num_addressable_vars++] = alias_map;
@@ -1194,9 +1194,8 @@ setup_pointers_and_addressables (struct alias_info *ai)
because some TREE_ADDRESSABLE variables will be marked
non-addressable below and only pointers with unique type tags are
going to be added to POINTERS. */
- ai->addressable_vars = xcalloc (num_addressable_vars,
- sizeof (struct alias_map_d *));
- ai->pointers = xcalloc (num_pointers, sizeof (struct alias_map_d *));
+ ai->addressable_vars = XCNEWVEC (struct alias_map_d *, num_addressable_vars);
+ ai->pointers = XCNEWVEC (struct alias_map_d *, num_pointers);
ai->num_addressable_vars = 0;
ai->num_pointers = 0;
@@ -1857,7 +1856,7 @@ get_tmt_for (tree ptr, struct alias_info *ai)
/* Add PTR to the POINTERS array. Note that we are not interested in
PTR's alias set. Instead, we cache the alias set for the memory that
PTR points to. */
- alias_map = xcalloc (1, sizeof (*alias_map));
+ alias_map = XCNEW (struct alias_map_d);
alias_map->var = ptr;
alias_map->set = tag_set;
ai->pointers[ai->num_pointers++] = alias_map;
@@ -2019,7 +2018,7 @@ get_ptr_info (tree t)
pi = SSA_NAME_PTR_INFO (t);
if (pi == NULL)
{
- pi = ggc_alloc (sizeof (*pi));
+ pi = GGC_NEW (struct ptr_info_def);
memset ((void *)pi, 0, sizeof (*pi));
SSA_NAME_PTR_INFO (t) = pi;
}
@@ -2439,7 +2438,8 @@ struct used_part_map
static int
used_part_map_eq (const void *va, const void *vb)
{
- const struct used_part_map *a = va, *b = vb;
+ const struct used_part_map *a = (const struct used_part_map *) va;
+ const struct used_part_map *b = (const struct used_part_map *) vb;
return (a->uid == b->uid);
}
@@ -2467,7 +2467,7 @@ up_lookup (unsigned int uid)
{
struct used_part_map *h, in;
in.uid = uid;
- h = htab_find_with_hash (used_portions, &in, uid);
+ h = (struct used_part_map *) htab_find_with_hash (used_portions, &in, uid);
if (!h)
return NULL;
return h->to;
@@ -2481,7 +2481,7 @@ up_insert (unsigned int uid, used_part_t to)
struct used_part_map *h;
void **loc;
- h = xmalloc (sizeof (struct used_part_map));
+ h = XNEW (struct used_part_map);
h->uid = uid;
h->to = to;
loc = htab_find_slot_with_hash (used_portions, h,
@@ -2501,7 +2501,7 @@ get_or_create_used_part_for (size_t uid)
used_part_t up;
if ((up = up_lookup (uid)) == NULL)
{
- up = xcalloc (1, sizeof (struct used_part));
+ up = XCNEW (struct used_part);
up->minused = INT_MAX;
up->maxused = 0;
up->explicit_uses = false;
@@ -2643,7 +2643,7 @@ create_overlap_variables_for (tree var)
&& fosize == lastfosize
&& currfotype == lastfotype))
continue;
- sv = ggc_alloc (sizeof (struct subvar));
+ sv = GGC_NEW (struct subvar);
sv->offset = fo->offset;
sv->size = fosize;
sv->next = *subvars;