summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-uncprop.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-uncprop.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-uncprop.c')
-rw-r--r--gcc/tree-ssa-uncprop.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/gcc/tree-ssa-uncprop.c b/gcc/tree-ssa-uncprop.c
index 28d385098fb..c79b120ce3d 100644
--- a/gcc/tree-ssa-uncprop.c
+++ b/gcc/tree-ssa-uncprop.c
@@ -95,12 +95,12 @@ associate_equivalences_with_edges (void)
if (TREE_CODE (cond) == SSA_NAME
&& !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (cond))
{
- equivalency = xmalloc (sizeof (struct edge_equivalency));
+ equivalency = XNEW (struct edge_equivalency);
equivalency->rhs = constant_boolean_node (1, TREE_TYPE (cond));
equivalency->lhs = cond;
true_edge->aux = equivalency;
- equivalency = xmalloc (sizeof (struct edge_equivalency));
+ equivalency = XNEW (struct edge_equivalency);
equivalency->rhs = constant_boolean_node (0, TREE_TYPE (cond));
equivalency->lhs = cond;
false_edge->aux = equivalency;
@@ -121,14 +121,14 @@ associate_equivalences_with_edges (void)
{
if (TREE_CODE (cond) == EQ_EXPR)
{
- equivalency = xmalloc (sizeof (struct edge_equivalency));
+ equivalency = XNEW (struct edge_equivalency);
equivalency->lhs = op0;
equivalency->rhs = (integer_zerop (op1)
? boolean_false_node
: boolean_true_node);
true_edge->aux = equivalency;
- equivalency = xmalloc (sizeof (struct edge_equivalency));
+ equivalency = XNEW (struct edge_equivalency);
equivalency->lhs = op0;
equivalency->rhs = (integer_zerop (op1)
? boolean_true_node
@@ -137,14 +137,14 @@ associate_equivalences_with_edges (void)
}
else
{
- equivalency = xmalloc (sizeof (struct edge_equivalency));
+ equivalency = XNEW (struct edge_equivalency);
equivalency->lhs = op0;
equivalency->rhs = (integer_zerop (op1)
? boolean_true_node
: boolean_false_node);
true_edge->aux = equivalency;
- equivalency = xmalloc (sizeof (struct edge_equivalency));
+ equivalency = XNEW (struct edge_equivalency);
equivalency->lhs = op0;
equivalency->rhs = (integer_zerop (op1)
? boolean_false_node
@@ -168,7 +168,7 @@ associate_equivalences_with_edges (void)
|| REAL_VALUES_EQUAL (dconst0, TREE_REAL_CST (op1))))
continue;
- equivalency = xmalloc (sizeof (struct edge_equivalency));
+ equivalency = XNEW (struct edge_equivalency);
equivalency->lhs = op0;
equivalency->rhs = op1;
if (TREE_CODE (cond) == EQ_EXPR)
@@ -194,7 +194,7 @@ associate_equivalences_with_edges (void)
{
tree labels = SWITCH_LABELS (stmt);
int i, n_labels = TREE_VEC_LENGTH (labels);
- tree *info = xcalloc (n_basic_blocks, sizeof (tree));
+ tree *info = XCNEWVEC (tree, n_basic_blocks);
/* Walk over the case label vector. Record blocks
which are reached by a single case label which represents
@@ -227,7 +227,7 @@ associate_equivalences_with_edges (void)
/* Record an equivalency on the edge from BB to basic
block I. */
- equivalency = xmalloc (sizeof (struct edge_equivalency));
+ equivalency = XNEW (struct edge_equivalency);
equivalency->rhs = x;
equivalency->lhs = cond;
find_edge (bb, BASIC_BLOCK (i))->aux = equivalency;
@@ -364,7 +364,7 @@ record_equiv (tree value, tree equivalence)
struct equiv_hash_elt *equiv_hash_elt;
void **slot;
- equiv_hash_elt = xmalloc (sizeof (struct equiv_hash_elt));
+ equiv_hash_elt = XNEW (struct equiv_hash_elt);
equiv_hash_elt->value = value;
equiv_hash_elt->equivalences = NULL;
@@ -486,7 +486,7 @@ uncprop_into_successor_phis (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED,
/* Record any equivalency associated with E. */
if (e->aux)
{
- struct edge_equivalency *equiv = e->aux;
+ struct edge_equivalency *equiv = (struct edge_equivalency *) e->aux;
record_equiv (equiv->rhs, equiv->lhs);
}
@@ -512,7 +512,7 @@ uncprop_into_successor_phis (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED,
if (slot)
{
- struct equiv_hash_elt *elt = *slot;
+ struct equiv_hash_elt *elt = (struct equiv_hash_elt *) *slot;
int j;
/* Walk every equivalence with the same value. If we find
@@ -536,7 +536,7 @@ uncprop_into_successor_phis (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED,
/* If we had an equivalence associated with this edge, remove it. */
if (e->aux)
{
- struct edge_equivalency *equiv = e->aux;
+ struct edge_equivalency *equiv = (struct edge_equivalency *) e->aux;
remove_equivalence (equiv->rhs);
}
}
@@ -589,7 +589,7 @@ uncprop_initialize_block (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED,
if (e && e->src == parent && e->aux)
{
- struct edge_equivalency *equiv = e->aux;
+ struct edge_equivalency *equiv = (struct edge_equivalency *) e->aux;
record_equiv (equiv->rhs, equiv->lhs);
VEC_safe_push (tree, heap, equiv_stack, equiv->rhs);