This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH to remove implicit conversion from void * [2/n]
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: gcc-patches at gcc dot gnu dot org
- Date: 18 Dec 2005 03:28:25 +0100
- Subject: PATCH to remove implicit conversion from void * [2/n]
fixes small portion of places showed by -Wc++-compat.
Bootstrapped on and i686-pc-linux-gnu.
Applied to mainline.
-- Gaby
2005-12-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
* tree-vn.c (vn_add): Use XNEW.
* tree-ssa-ccp.c (ccp_initialize): Use XNEWVEC.
(ccp_fold): Likewise.
(fold_stmt_r): Use explicit cast to convert from void *.
* tree-outof-ssa.c (new_temp_expr_table): Use XCNEWVEC.
(new_temp_expr_table): Likewise.
* gimplify.c (lookup_tmp_var): Use XNEW.
(gimplify_asm_expr): Use explcit cast to convert from void *.
* tree-into-ssa.c (get_ssa_name_ann): Likewise.
(get_def_blocks_for): Use XNEW.
(add_to_repl_tbl): Likewise.
(mark_def_sites): Use explicit cast to convert from void *.
(def_blocks_free): Likewise.
(mark_def_sites_initialize_block): Likewise.
(update_ssa): Use XNEWVEC.
* tree-dfa.c (create_var_ann): Use GGC_NEW.
(create_stmt_ann): Likewise.
(create_tree_ann): Likewise.
(referenced_var_insert): Likewise.
(set_default_def): Likewise.
(referenced_var_lookup_if_exists): Use explicit cast to convert
from void *.
(referenced_var_lookup): Likewise.
(default_def): Likewise.
(set_default_def): Likewise.
* tree-cfg.c (create_bb): Likewise.
(edge_to_cases_cleanup): Likewise.
(verify_node_sharing): Likewise.
(record_switch_edge): Use XNEW.
(cleanup_dead_labels): Use XCNEWVEC.
(tree_duplicate_sese_region): Use XNEWVEC.
* tree-scalar-evolution.c (get_instantiated_value): Likewise.
* tree-ssa.c (verify_ssa): Use XCNEWVEC.
(int_tree_map_eq): Use explicit cast to convert from void *.
* libgcov.c (gcov_exit): Use explicit cast to convert from void *.
(__gcov_execl): Likewise.
(__gcov_execlp): Likewise.
(__gcov_execle): Likewise.
* tree-eh.c (struct_ptr_eq): Likewise.
(struct_ptr_hash): Likewise.
(lookup_stmt_eh_region_fn): Likewise.
(outside_finally_tree): Likewise.
(find_goto_replacement): Likewise.
(make_eh_edge): Likewise.
(mark_eh_edge): Likewise.
(add_stmt_to_eh_region_fn): Use GGC_NEW.
(record_in_finally_tree): Use XNEW.
(maybe_record_in_goto_queue): Use XRESIZEVEC.
(lower_try_finally_copy): Use XCNEWVEC.
*** gimplify.c (revision 108726)
--- gimplify.c (local)
*************** lookup_tmp_var (tree val, bool is_formal
*** 473,479 ****
slot = htab_find_slot (gimplify_ctxp->temp_htab, (void *)&elt, INSERT);
if (*slot == NULL)
{
! elt_p = xmalloc (sizeof (*elt_p));
elt_p->val = val;
elt_p->temp = ret = create_tmp_from_val (val);
*slot = (void *) elt_p;
--- 473,479 ----
slot = htab_find_slot (gimplify_ctxp->temp_htab, (void *)&elt, INSERT);
if (*slot == NULL)
{
! elt_p = XNEW (elt_t);
elt_p->val = val;
elt_p->temp = ret = create_tmp_from_val (val);
*slot = (void *) elt_p;
*************** gimplify_asm_expr (tree *expr_p, tree *p
*** 3705,3711 ****
break;
}
! str = alloca (len);
for (beg = p + 1, dst = str;;)
{
const char *tem;
--- 3705,3711 ----
break;
}
! str = (char *) alloca (len);
for (beg = p + 1, dst = str;;)
{
const char *tem;
*** libgcov.c (revision 108726)
--- libgcov.c (local)
*************** gcov_exit (void)
*** 218,224 ****
prefix_length = 0;
/* Allocate and initialize the filename scratch space. */
! gi_filename = alloca (prefix_length + gcov_max_filename + 1);
if (prefix_length)
memcpy (gi_filename, gcov_prefix, prefix_length);
gi_filename_up = gi_filename + prefix_length;
--- 218,224 ----
prefix_length = 0;
/* Allocate and initialize the filename scratch space. */
! gi_filename = (char *) alloca (prefix_length + gcov_max_filename + 1);
if (prefix_length)
memcpy (gi_filename, gcov_prefix, prefix_length);
gi_filename_up = gi_filename + prefix_length;
*************** __gcov_execl (const char *path, const ch
*** 786,792 ****
length++;
va_end (ap);
! args = alloca (length * sizeof (void *));
args[0] = (char *) arg;
for (i = 1; i < length; i++)
args[i] = va_arg (aq, char *);
--- 786,792 ----
length++;
va_end (ap);
! args = (char **) alloca (length * sizeof (void *));
args[0] = (char *) arg;
for (i = 1; i < length; i++)
args[i] = va_arg (aq, char *);
*************** __gcov_execlp (const char *path, const c
*** 817,823 ****
length++;
va_end (ap);
! args = alloca (length * sizeof (void *));
args[0] = (char *) arg;
for (i = 1; i < length; i++)
args[i] = va_arg (aq, char *);
--- 817,823 ----
length++;
va_end (ap);
! args = (char **) alloca (length * sizeof (void *));
args[0] = (char *) arg;
for (i = 1; i < length; i++)
args[i] = va_arg (aq, char *);
*************** __gcov_execle (const char *path, const c
*** 849,855 ****
length++;
va_end (ap);
! args = alloca (length * sizeof (void *));
args[0] = (char *) arg;
for (i = 1; i < length; i++)
args[i] = va_arg (aq, char *);
--- 849,855 ----
length++;
va_end (ap);
! args = (char **) alloca (length * sizeof (void *));
args[0] = (char *) arg;
for (i = 1; i < length; i++)
args[i] = va_arg (aq, char *);
*** tree-cfg.c (revision 108726)
--- tree-cfg.c (local)
*************** create_bb (void *h, void *e, basic_block
*** 374,380 ****
bb->index = last_basic_block;
bb->flags = BB_NEW;
! bb->stmt_list = h ? h : alloc_stmt_list ();
/* Add the new block to the linked list of blocks. */
link_block (bb, after);
--- 374,380 ----
bb->index = last_basic_block;
bb->flags = BB_NEW;
! bb->stmt_list = h ? (tree) h : alloc_stmt_list ();
/* Add the new block to the linked list of blocks. */
link_block (bb, after);
*************** edge_to_cases_eq (const void *p1, const
*** 640,646 ****
static void
edge_to_cases_cleanup (void *p)
{
! struct edge_to_cases_elt *elt = p;
tree t, next;
for (t = elt->case_labels; t; t = next)
--- 640,646 ----
static void
edge_to_cases_cleanup (void *p)
{
! struct edge_to_cases_elt *elt = (struct edge_to_cases_elt *) p;
tree t, next;
for (t = elt->case_labels; t; t = next)
*************** record_switch_edge (edge e, tree case_la
*** 691,697 ****
/* Build a hash table element so we can see if E is already
in the table. */
! elt = xmalloc (sizeof (struct edge_to_cases_elt));
elt->e = e;
elt->case_labels = case_label;
--- 691,697 ----
/* Build a hash table element so we can see if E is already
in the table. */
! elt = XNEW (struct edge_to_cases_elt);
elt->e = e;
elt->case_labels = case_label;
*************** void
*** 942,948 ****
cleanup_dead_labels (void)
{
basic_block bb;
! label_for_bb = xcalloc (last_basic_block, sizeof (tree));
/* Find a suitable label for each block. We use the first user-defined
label if there is one, or otherwise just the first label we see. */
--- 942,948 ----
cleanup_dead_labels (void)
{
basic_block bb;
! label_for_bb = XCNEWVEC (tree, last_basic_block);
/* Find a suitable label for each block. We use the first user-defined
label if there is one, or otherwise just the first label we see. */
*************** verify_node_sharing (tree * tp, int *wal
*** 3453,3459 ****
slot = htab_find_slot (htab, *tp, INSERT);
if (*slot)
! return *slot;
*slot = *tp;
return NULL;
--- 3453,3459 ----
slot = htab_find_slot (htab, *tp, INSERT);
if (*slot)
! return (tree) *slot;
*slot = *tp;
return NULL;
*************** tree_duplicate_sese_region (edge entry,
*** 4343,4349 ****
if (!region_copy)
{
! region_copy = xmalloc (sizeof (basic_block) * n_region);
free_region_copy = true;
}
--- 4343,4349 ----
if (!region_copy)
{
! region_copy = XNEWVEC (basic_block, n_region);
free_region_copy = true;
}
*************** tree_duplicate_sese_region (edge entry,
*** 4351,4357 ****
/* Record blocks outside the region that are dominated by something
inside. */
! doms = xmalloc (sizeof (basic_block) * n_basic_blocks);
initialize_original_copy_tables ();
n_doms = get_dominated_by_region (CDI_DOMINATORS, region, n_region, doms);
--- 4351,4357 ----
/* Record blocks outside the region that are dominated by something
inside. */
! doms = XNEWVEC (basic_block, n_basic_blocks);
initialize_original_copy_tables ();
n_doms = get_dominated_by_region (CDI_DOMINATORS, region, n_region, doms);
*** tree-dfa.c (revision 108726)
--- tree-dfa.c (local)
*************** create_var_ann (tree t)
*** 157,163 ****
gcc_assert (DECL_P (t));
gcc_assert (!t->common.ann || t->common.ann->common.type == VAR_ANN);
! ann = ggc_alloc (sizeof (*ann));
memset ((void *) ann, 0, sizeof (*ann));
ann->common.type = VAR_ANN;
--- 157,163 ----
gcc_assert (DECL_P (t));
gcc_assert (!t->common.ann || t->common.ann->common.type == VAR_ANN);
! ann = GGC_NEW (struct var_ann_d);
memset ((void *) ann, 0, sizeof (*ann));
ann->common.type = VAR_ANN;
*************** create_stmt_ann (tree t)
*** 178,184 ****
gcc_assert (is_gimple_stmt (t));
gcc_assert (!t->common.ann || t->common.ann->common.type == STMT_ANN);
! ann = ggc_alloc (sizeof (*ann));
memset ((void *) ann, 0, sizeof (*ann));
ann->common.type = STMT_ANN;
--- 178,184 ----
gcc_assert (is_gimple_stmt (t));
gcc_assert (!t->common.ann || t->common.ann->common.type == STMT_ANN);
! ann = GGC_NEW (struct stmt_ann_d);
memset ((void *) ann, 0, sizeof (*ann));
ann->common.type = STMT_ANN;
*************** create_tree_ann (tree t)
*** 201,207 ****
gcc_assert (t);
gcc_assert (!t->common.ann || t->common.ann->common.type == TREE_ANN_COMMON);
! ann = ggc_alloc (sizeof (*ann));
memset ((void *) ann, 0, sizeof (*ann));
ann->common.type = TREE_ANN_COMMON;
--- 201,207 ----
gcc_assert (t);
gcc_assert (!t->common.ann || t->common.ann->common.type == TREE_ANN_COMMON);
! ann = GGC_NEW (union tree_ann_d);
memset ((void *) ann, 0, sizeof (*ann));
ann->common.type = TREE_ANN_COMMON;
*************** referenced_var_lookup_if_exists (unsigne
*** 580,586 ****
{
struct int_tree_map *h, in;
in.uid = uid;
! h = htab_find_with_hash (referenced_vars, &in, uid);
if (h)
return h->to;
return NULL_TREE;
--- 580,586 ----
{
struct int_tree_map *h, in;
in.uid = uid;
! h = (struct int_tree_map *) htab_find_with_hash (referenced_vars, &in, uid);
if (h)
return h->to;
return NULL_TREE;
*************** referenced_var_lookup (unsigned int uid)
*** 594,600 ****
{
struct int_tree_map *h, in;
in.uid = uid;
! h = htab_find_with_hash (referenced_vars, &in, uid);
gcc_assert (h || uid == 0);
if (h)
return h->to;
--- 594,600 ----
{
struct int_tree_map *h, in;
in.uid = uid;
! h = (struct int_tree_map *) htab_find_with_hash (referenced_vars, &in, uid);
gcc_assert (h || uid == 0);
if (h)
return h->to;
*************** referenced_var_insert (unsigned int uid,
*** 609,615 ****
struct int_tree_map *h;
void **loc;
! h = ggc_alloc (sizeof (struct int_tree_map));
h->uid = uid;
h->to = to;
loc = htab_find_slot_with_hash (referenced_vars, h, uid, INSERT);
--- 609,615 ----
struct int_tree_map *h;
void **loc;
! h = GGC_NEW (struct int_tree_map);
h->uid = uid;
h->to = to;
loc = htab_find_slot_with_hash (referenced_vars, h, uid, INSERT);
*************** default_def (tree var)
*** 625,631 ****
struct int_tree_map *h, in;
gcc_assert (SSA_VAR_P (var));
in.uid = DECL_UID (var);
! h = htab_find_with_hash (default_defs, &in, DECL_UID (var));
if (h)
return h->to;
return NULL_TREE;
--- 625,632 ----
struct int_tree_map *h, in;
gcc_assert (SSA_VAR_P (var));
in.uid = DECL_UID (var);
! h = (struct int_tree_map *) htab_find_with_hash (default_defs, &in,
! DECL_UID (var));
if (h)
return h->to;
return NULL_TREE;
*************** set_default_def (tree var, tree def)
*** 653,666 ****
/* Default definition might be changed by tail call optimization. */
if (!*loc)
{
! h = ggc_alloc (sizeof (struct int_tree_map));
h->uid = DECL_UID (var);
h->to = def;
*(struct int_tree_map **) loc = h;
}
else
{
! h = *loc;
h->to = def;
}
}
--- 654,667 ----
/* Default definition might be changed by tail call optimization. */
if (!*loc)
{
! h = GGC_NEW (struct int_tree_map);
h->uid = DECL_UID (var);
h->to = def;
*(struct int_tree_map **) loc = h;
}
else
{
! h = (struct int_tree_map *) *loc;
h->to = def;
}
}
*** tree-eh.c (revision 108726)
--- tree-eh.c (local)
*************** using_eh_for_cleanups (void)
*** 57,71 ****
static int
struct_ptr_eq (const void *a, const void *b)
{
! const void * const * x = a;
! const void * const * y = b;
return *x == *y;
}
static hashval_t
struct_ptr_hash (const void *a)
{
! const void * const * x = a;
return (size_t)*x >> 4;
}
--- 57,71 ----
static int
struct_ptr_eq (const void *a, const void *b)
{
! const void * const * x = (const void * const *) a;
! const void * const * y = (const void * const *) b;
return *x == *y;
}
static hashval_t
struct_ptr_hash (const void *a)
{
! const void * const * x = (const void * const *) a;
return (size_t)*x >> 4;
}
*************** add_stmt_to_eh_region_fn (struct functio
*** 100,106 ****
gcc_assert (num >= 0);
gcc_assert (TREE_CODE (t) != RESX_EXPR);
! n = ggc_alloc (sizeof (*n));
n->stmt = t;
n->region_nr = num;
--- 100,106 ----
gcc_assert (num >= 0);
gcc_assert (TREE_CODE (t) != RESX_EXPR);
! n = GGC_NEW (struct throw_stmt_node);
n->stmt = t;
n->region_nr = num;
*************** lookup_stmt_eh_region_fn (struct functio
*** 168,174 ****
return -2;
n.stmt = t;
! p = htab_find (get_eh_throw_stmt_table (ifun), &n);
return (p ? p->region_nr : -1);
}
--- 168,175 ----
return -2;
n.stmt = t;
! p = (struct throw_stmt_node *) htab_find (get_eh_throw_stmt_table (ifun),
! &n);
return (p ? p->region_nr : -1);
}
*************** record_in_finally_tree (tree child, tree
*** 202,208 ****
struct finally_tree_node *n;
void **slot;
! n = xmalloc (sizeof (*n));
n->child = child;
n->parent = parent;
--- 203,209 ----
struct finally_tree_node *n;
void **slot;
! n = XNEW (struct finally_tree_node);
n->child = child;
n->parent = parent;
*************** outside_finally_tree (tree start, tree t
*** 266,272 ****
do
{
n.child = start;
! p = htab_find (finally_tree, &n);
if (!p)
return true;
start = p->parent;
--- 267,273 ----
do
{
n.child = start;
! p = (struct finally_tree_node *) htab_find (finally_tree, &n);
if (!p)
return true;
start = p->parent;
*************** find_goto_replacement (struct leh_tf_sta
*** 369,375 ****
{
struct goto_queue_node tmp, *ret;
tmp.stmt = stmt;
! ret = bsearch (&tmp, tf->goto_queue, tf->goto_queue_active,
sizeof (struct goto_queue_node), goto_queue_cmp);
return (ret ? ret->repl_stmt : NULL);
}
--- 370,377 ----
{
struct goto_queue_node tmp, *ret;
tmp.stmt = stmt;
! ret = (struct goto_queue_node *)
! bsearch (&tmp, tf->goto_queue, tf->goto_queue_active,
sizeof (struct goto_queue_node), goto_queue_cmp);
return (ret ? ret->repl_stmt : NULL);
}
*************** maybe_record_in_goto_queue (struct leh_s
*** 537,543 ****
size = (size ? size * 2 : 32);
tf->goto_queue_size = size;
tf->goto_queue
! = xrealloc (tf->goto_queue, size * sizeof (struct goto_queue_node));
}
q = &tf->goto_queue[active];
--- 539,545 ----
size = (size ? size * 2 : 32);
tf->goto_queue_size = size;
tf->goto_queue
! = XRESIZEVEC (struct goto_queue_node, tf->goto_queue, size);
}
q = &tf->goto_queue[active];
*************** lower_try_finally_copy (struct leh_state
*** 1058,1071 ****
struct goto_queue_node *q, *qe;
tree return_val = NULL;
int return_index, index;
! struct
{
struct goto_queue_node *q;
tree label;
} *labels;
return_index = VEC_length (tree, tf->dest_array);
! labels = xcalloc (sizeof (*labels), return_index + 1);
q = tf->goto_queue;
qe = q + tf->goto_queue_active;
--- 1060,1073 ----
struct goto_queue_node *q, *qe;
tree return_val = NULL;
int return_index, index;
! struct labels_s
{
struct goto_queue_node *q;
tree label;
} *labels;
return_index = VEC_length (tree, tf->dest_array);
! labels = XCNEWVEC (struct labels_s, return_index + 1);
q = tf->goto_queue;
qe = q + tf->goto_queue_active;
*************** make_eh_edge (struct eh_region *region,
*** 1713,1719 ****
tree stmt, lab;
basic_block src, dst;
! stmt = data;
lab = get_eh_region_tree_label (region);
src = bb_for_stmt (stmt);
--- 1715,1721 ----
tree stmt, lab;
basic_block src, dst;
! stmt = (tree) data;
lab = get_eh_region_tree_label (region);
src = bb_for_stmt (stmt);
*************** mark_eh_edge (struct eh_region *region,
*** 1755,1761 ****
basic_block src, dst;
edge e;
! stmt = data;
lab = get_eh_region_tree_label (region);
src = bb_for_stmt (stmt);
--- 1757,1763 ----
basic_block src, dst;
edge e;
! stmt = (tree) data;
lab = get_eh_region_tree_label (region);
src = bb_for_stmt (stmt);
*** tree-into-ssa.c (revision 108726)
--- tree-into-ssa.c (local)
*************** get_ssa_name_ann (tree name)
*** 246,252 ****
if (!SSA_NAME_AUX (name))
SSA_NAME_AUX (name) = xcalloc (1, sizeof (struct ssa_name_info));
! return SSA_NAME_AUX (name);
}
--- 246,252 ----
if (!SSA_NAME_AUX (name))
SSA_NAME_AUX (name) = xcalloc (1, sizeof (struct ssa_name_info));
! return (struct ssa_name_info *) SSA_NAME_AUX (name);
}
*************** get_def_blocks_for (tree var)
*** 365,371 ****
slot = htab_find_slot (def_blocks, (void *) &db, INSERT);
if (*slot == NULL)
{
! db_p = xmalloc (sizeof (*db_p));
db_p->var = var;
db_p->def_blocks = BITMAP_ALLOC (NULL);
db_p->phi_blocks = BITMAP_ALLOC (NULL);
--- 365,371 ----
slot = htab_find_slot (def_blocks, (void *) &db, INSERT);
if (*slot == NULL)
{
! db_p = XNEW (struct def_blocks_d);
db_p->var = var;
db_p->def_blocks = BITMAP_ALLOC (NULL);
db_p->phi_blocks = BITMAP_ALLOC (NULL);
*************** add_to_repl_tbl (tree new, tree old)
*** 532,538 ****
slot = htab_find_slot (repl_tbl, (void *) &m, INSERT);
if (*slot == NULL)
{
! mp = xmalloc (sizeof (*mp));
mp->name = new;
mp->set = BITMAP_ALLOC (NULL);
*slot = (void *) mp;
--- 532,538 ----
slot = htab_find_slot (repl_tbl, (void *) &m, INSERT);
if (*slot == NULL)
{
! mp = XNEW (struct repl_map_d);
mp->name = new;
mp->set = BITMAP_ALLOC (NULL);
*slot = (void *) mp;
*************** mark_def_sites (struct dom_walk_data *wa
*** 630,636 ****
basic_block bb,
block_stmt_iterator bsi)
{
! struct mark_def_sites_global_data *gd = walk_data->global_data;
bitmap kills = gd->kills;
tree stmt, def;
use_operand_p use_p;
--- 630,637 ----
basic_block bb,
block_stmt_iterator bsi)
{
! struct mark_def_sites_global_data *gd =
! (struct mark_def_sites_global_data *) walk_data->global_data;
bitmap kills = gd->kills;
tree stmt, def;
use_operand_p use_p;
*************** def_blocks_eq (const void *p1, const voi
*** 1203,1209 ****
static void
def_blocks_free (void *p)
{
! struct def_blocks_d *entry = p;
BITMAP_FREE (entry->def_blocks);
BITMAP_FREE (entry->phi_blocks);
BITMAP_FREE (entry->livein_blocks);
--- 1204,1210 ----
static void
def_blocks_free (void *p)
{
! struct def_blocks_d *entry = (struct def_blocks_d *) p;
BITMAP_FREE (entry->def_blocks);
BITMAP_FREE (entry->phi_blocks);
BITMAP_FREE (entry->livein_blocks);
*************** static void
*** 1645,1651 ****
mark_def_sites_initialize_block (struct dom_walk_data *walk_data,
basic_block bb ATTRIBUTE_UNUSED)
{
! struct mark_def_sites_global_data *gd = walk_data->global_data;
bitmap kills = gd->kills;
bitmap_clear (kills);
}
--- 1646,1653 ----
mark_def_sites_initialize_block (struct dom_walk_data *walk_data,
basic_block bb ATTRIBUTE_UNUSED)
{
! struct mark_def_sites_global_data *gd =
! (struct mark_def_sites_global_data *) walk_data->global_data;
bitmap kills = gd->kills;
bitmap_clear (kills);
}
*************** update_ssa (unsigned update_flags)
*** 2744,2750 ****
/* If the caller requested PHI nodes to be added, compute
dominance frontiers. */
! dfs = xmalloc (last_basic_block * sizeof (bitmap));
FOR_EACH_BB (bb)
dfs[bb->index] = BITMAP_ALLOC (NULL);
compute_dominance_frontiers (dfs);
--- 2746,2752 ----
/* If the caller requested PHI nodes to be added, compute
dominance frontiers. */
! dfs = XNEWVEC (bitmap, last_basic_block);
FOR_EACH_BB (bb)
dfs[bb->index] = BITMAP_ALLOC (NULL);
compute_dominance_frontiers (dfs);
*** tree-outof-ssa.c (revision 108726)
--- tree-outof-ssa.c (local)
*************** new_temp_expr_table (var_map map)
*** 1340,1351 ****
{
temp_expr_table_p t;
! t = (temp_expr_table_p) xmalloc (sizeof (struct temp_expr_table_d));
t->map = map;
! t->version_info = xcalloc (num_ssa_names + 1, sizeof (void *));
! t->partition_dep_list = xcalloc (num_var_partitions (map) + 1,
! sizeof (value_expr_p));
t->replaceable = BITMAP_ALLOC (NULL);
t->partition_in_use = BITMAP_ALLOC (NULL);
--- 1340,1351 ----
{
temp_expr_table_p t;
! t = XNEW (struct temp_expr_table_d);
t->map = map;
! t->version_info = XCNEWVEC (void *, num_ssa_names + 1);
! t->partition_dep_list = XCNEWVEC (value_expr_p,
! num_var_partitions (map) + 1);
t->replaceable = BITMAP_ALLOC (NULL);
t->partition_in_use = BITMAP_ALLOC (NULL);
*** tree-scalar-evolution.c (revision 108726)
--- tree-scalar-evolution.c (local)
*************** get_instantiated_value (htab_t cache, tr
*** 1867,1873 ****
struct scev_info_str *info, pattern;
pattern.var = version;
! info = htab_find (cache, &pattern);
if (info)
return info->chrec;
--- 1867,1873 ----
struct scev_info_str *info, pattern;
pattern.var = version;
! info = (struct scev_info_str *) htab_find (cache, &pattern);
if (info)
return info->chrec;
*** tree-ssa-ccp.c (revision 108726)
--- tree-ssa-ccp.c (local)
*************** ccp_initialize (void)
*** 538,544 ****
{
basic_block bb;
! const_val = xmalloc (num_ssa_names * sizeof (*const_val));
memset (const_val, 0, num_ssa_names * sizeof (*const_val));
/* Initialize simulation flags for PHI nodes and statements. */
--- 538,544 ----
{
basic_block bb;
! const_val = XNEWVEC (prop_value_t, num_ssa_names);
memset (const_val, 0, num_ssa_names * sizeof (*const_val));
/* Initialize simulation flags for PHI nodes and statements. */
*************** ccp_fold (tree stmt)
*** 935,941 ****
use_operand_p var_p;
/* Preserve the original values of every operand. */
! orig = xmalloc (sizeof (tree) * NUM_SSA_OPERANDS (stmt, SSA_OP_USE));
FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_USE)
orig[i++] = var;
--- 935,941 ----
use_operand_p var_p;
/* Preserve the original values of every operand. */
! orig = XNEWVEC (tree, NUM_SSA_OPERANDS (stmt, SSA_OP_USE));
FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_USE)
orig[i++] = var;
*************** struct fold_stmt_r_data
*** 1937,1943 ****
static tree
fold_stmt_r (tree *expr_p, int *walk_subtrees, void *data)
{
! struct fold_stmt_r_data *fold_stmt_r_data = data;
bool *inside_addr_expr_p = fold_stmt_r_data->inside_addr_expr_p;
bool *changed_p = fold_stmt_r_data->changed_p;
tree expr = *expr_p, t;
--- 1937,1943 ----
static tree
fold_stmt_r (tree *expr_p, int *walk_subtrees, void *data)
{
! struct fold_stmt_r_data *fold_stmt_r_data = (struct fold_stmt_r_data *) data;
bool *inside_addr_expr_p = fold_stmt_r_data->inside_addr_expr_p;
bool *changed_p = fold_stmt_r_data->changed_p;
tree expr = *expr_p, t;
*** tree-ssa.c (revision 108726)
--- tree-ssa.c (local)
*************** verify_ssa (bool check_modified_stmt)
*** 634,640 ****
{
size_t i;
basic_block bb;
! basic_block *definition_block = xcalloc (num_ssa_names, sizeof (basic_block));
ssa_op_iter iter;
tree op;
enum dom_state orig_dom_state = dom_computed[CDI_DOMINATORS];
--- 634,640 ----
{
size_t i;
basic_block bb;
! basic_block *definition_block = XCNEWVEC (basic_block, num_ssa_names);
ssa_op_iter iter;
tree op;
enum dom_state orig_dom_state = dom_computed[CDI_DOMINATORS];
*************** err:
*** 781,787 ****
int
int_tree_map_eq (const void *va, const void *vb)
{
! const struct int_tree_map *a = va, *b = vb;
return (a->uid == b->uid);
}
--- 781,788 ----
int
int_tree_map_eq (const void *va, const void *vb)
{
! const struct int_tree_map *a = (const struct int_tree_map *) va;
! const struct int_tree_map *b = (const struct int_tree_map *) vb;
return (a->uid == b->uid);
}
*** tree-vn.c (revision 108726)
--- tree-vn.c (local)
*************** vn_add (tree expr, tree val, tree stmt)
*** 201,207 ****
void **slot;
val_expr_pair_t new_pair;
! new_pair = xmalloc (sizeof (struct val_expr_pair_d));
new_pair->e = expr;
new_pair->v = val;
new_pair->stmt = stmt;
--- 201,207 ----
void **slot;
val_expr_pair_t new_pair;
! new_pair = XNEW (struct val_expr_pair_d);
new_pair->e = expr;
new_pair->v = val;
new_pair->stmt = stmt;