{
struct edge_info *edge_info;
- edge_info = xcalloc (1, sizeof (struct edge_info));
+ edge_info = XCNEW (struct edge_info);
e->aux = edge_info;
return edge_info;
{
FOR_EACH_EDGE (e, ei, bb->preds)
{
- struct edge_info *edge_info = e->aux;
+ struct edge_info *edge_info = (struct edge_info *) e->aux;
if (edge_info)
{
static void
vrp_free (void *data)
{
- struct vrp_hash_elt *elt = data;
+ struct vrp_hash_elt *elt = (struct vrp_hash_elt *) data;
struct VEC(vrp_element_p,heap) **vrp_elt = &elt->records;
VEC_free (vrp_element_p, heap, *vrp_elt);
unsigned int num, i = 0;
num = NUM_SSA_OPERANDS (stmt, (SSA_OP_USE | SSA_OP_VUSE));
- copy = xcalloc (num, sizeof (tree));
+ copy = XCNEWVEC (tree, num);
/* Make a copy of the uses & vuses into USES_COPY, then cprop into
the operands. */
/* Stuff the operator and operands into our dummy conditional
expression, creating the dummy conditional if necessary. */
- dummy_cond = walk_data->global_data;
+ dummy_cond = (tree) walk_data->global_data;
if (! dummy_cond)
{
dummy_cond = build2 (cond_code, boolean_type_node, op0, op1);
struct edge_info *edge_info;
if (e->aux)
- edge_info = e->aux;
+ edge_info = (struct edge_info *) e->aux;
else
edge_info = allocate_edge_info (e);
edge_info->redirection_target = taken_edge;
VEC_safe_push (tree, heap, avail_exprs_stack, NULL_TREE);
VEC_safe_push (tree, heap, const_and_copies_stack, NULL_TREE);
- edge_info = true_edge->aux;
+ edge_info = (struct edge_info *) true_edge->aux;
/* If we have info associated with this edge, record it into
our equivalency tables. */
struct edge_info *edge_info;
unsigned int i;
- edge_info = false_edge->aux;
+ edge_info = (struct edge_info *) false_edge->aux;
/* If we have info associated with this edge, record it into
our equivalency tables. */
{
unsigned int i;
- edge_info = e->aux;
+ edge_info = (struct edge_info *) e->aux;
if (edge_info)
{
static void
record_cond (tree cond, tree value)
{
- struct expr_hash_elt *element = xmalloc (sizeof (struct expr_hash_elt));
+ struct expr_hash_elt *element = XCNEW (struct expr_hash_elt);
void **slot;
initialize_hash_element (cond, value, element);
case LT_EXPR:
case GT_EXPR:
edge_info->max_cond_equivalences = 12;
- edge_info->cond_equivalences = xmalloc (12 * sizeof (tree));
+ edge_info->cond_equivalences = XNEWVEC (tree, 12);
build_and_record_new_cond ((TREE_CODE (cond) == LT_EXPR
? LE_EXPR : GE_EXPR),
op0, op1, &edge_info->cond_equivalences[4]);
case GE_EXPR:
case LE_EXPR:
edge_info->max_cond_equivalences = 6;
- edge_info->cond_equivalences = xmalloc (6 * sizeof (tree));
+ edge_info->cond_equivalences = XNEWVEC (tree, 6);
build_and_record_new_cond (ORDERED_EXPR, op0, op1,
&edge_info->cond_equivalences[4]);
break;
case EQ_EXPR:
edge_info->max_cond_equivalences = 10;
- edge_info->cond_equivalences = xmalloc (10 * sizeof (tree));
+ edge_info->cond_equivalences = XNEWVEC (tree, 10);
build_and_record_new_cond (ORDERED_EXPR, op0, op1,
&edge_info->cond_equivalences[4]);
build_and_record_new_cond (LE_EXPR, op0, op1,
case UNORDERED_EXPR:
edge_info->max_cond_equivalences = 16;
- edge_info->cond_equivalences = xmalloc (16 * sizeof (tree));
+ edge_info->cond_equivalences = XNEWVEC (tree, 16);
build_and_record_new_cond (NE_EXPR, op0, op1,
&edge_info->cond_equivalences[4]);
build_and_record_new_cond (UNLE_EXPR, op0, op1,
case UNLT_EXPR:
case UNGT_EXPR:
edge_info->max_cond_equivalences = 8;
- edge_info->cond_equivalences = xmalloc (8 * sizeof (tree));
+ edge_info->cond_equivalences = XNEWVEC (tree, 8);
build_and_record_new_cond ((TREE_CODE (cond) == UNLT_EXPR
? UNLE_EXPR : UNGE_EXPR),
op0, op1, &edge_info->cond_equivalences[4]);
case UNEQ_EXPR:
edge_info->max_cond_equivalences = 8;
- edge_info->cond_equivalences = xmalloc (8 * sizeof (tree));
+ edge_info->cond_equivalences = XNEWVEC (tree, 8);
build_and_record_new_cond (UNLE_EXPR, op0, op1,
&edge_info->cond_equivalences[4]);
build_and_record_new_cond (UNGE_EXPR, op0, op1,
case LTGT_EXPR:
edge_info->max_cond_equivalences = 8;
- edge_info->cond_equivalences = xmalloc (8 * sizeof (tree));
+ edge_info->cond_equivalences = XNEWVEC (tree, 8);
build_and_record_new_cond (NE_EXPR, op0, op1,
&edge_info->cond_equivalences[4]);
build_and_record_new_cond (ORDERED_EXPR, op0, op1,
default:
edge_info->max_cond_equivalences = 4;
- edge_info->cond_equivalences = xmalloc (4 * sizeof (tree));
+ edge_info->cond_equivalences = XNEWVEC (tree, 4);
break;
}
{
tree labels = SWITCH_LABELS (stmt);
int i, n_labels = TREE_VEC_LENGTH (labels);
- tree *info = xcalloc (last_basic_block, sizeof (tree));
+ tree *info = XCNEWVEC (tree, last_basic_block);
edge e;
edge_iterator ei;
void **slot;
tree lhs;
tree temp;
- struct expr_hash_elt *element = xmalloc (sizeof (struct expr_hash_elt));
+ struct expr_hash_elt *element = XNEW (struct expr_hash_elt);
lhs = TREE_CODE (stmt) == MODIFY_EXPR ? TREE_OPERAND (stmt, 0) : NULL;
void **slot;
- vrp_hash_elt = xmalloc (sizeof (struct vrp_hash_elt));
+ vrp_hash_elt = XNEW (struct vrp_hash_elt);
vrp_hash_elt->var = TREE_OPERAND (cond, 0);
vrp_hash_elt->records = NULL;
slot = htab_find_slot (vrp_data, vrp_hash_elt, INSERT);
vrp_hash_elt = (struct vrp_hash_elt *) *slot;
vrp_records_p = &vrp_hash_elt->records;
- element = ggc_alloc (sizeof (struct vrp_element));
+ element = GGC_NEW (struct vrp_element);
element->low = NULL;
element->high = NULL;
element->cond = cond;