* ggc.h (GGC_RESIZEVAR): New, reorder macros.
* tracer.c (tail_duplicate): Fix for -Wc++-compat.
* tree-affine.c (aff_combination_expand, free_name_expansion):
Likewise.
* tree-cfg.c (replace_by_duplicate_decl, replace_ssa_name,
move_stmt_r, new_label_mapper): Likewise.
* tree-complex.c (cvc_lookup): Likewise.
* tree-dfa.c (create_function_ann): Likewise.
* tree-dump.c (dump_register): Likewise.
* tree-if-conv.c (tree_if_conversion, add_to_predicate_list,
find_phi_replacement_condition): Likewise.
* tree-inline.c (copy_phis_for_bb, estimate_num_insns_1,
tree_function_versioning): Likewise.
* tree-into-ssa.c (cmp_dfsnum): Likewise.
* tree-iterator.c (tsi_link_before, tsi_link_after): Likewise.
* tree-nested.c (lookup_field_for_decl, lookup_tramp_for_decl,
get_nonlocal_debug_decl, convert_nonlocal_reference,
convert_nonlocal_omp_clauses, get_local_debug_decl,
convert_local_reference, convert_local_omp_clauses,
convert_nl_goto_reference, convert_nl_goto_receiver,
convert_tramp_reference, convert_call_expr): Likewise.
* tree-outof-ssa.c (contains_tree_r): Likewise.
* tree-parloops.c (reduction_phi, initialize_reductions,
eliminate_local_variables_1, add_field_for_reduction,
add_field_for_name, create_phi_for_local_result,
create_call_for_reduction_1, create_loads_for_reductions,
create_stores_for_reduction, create_loads_and_stores_for_name):
Likewise.
* tree-phinodes.c (allocate_phi_node): Likewise.
* tree-predcom.c (order_drefs, execute_pred_commoning_cbck):
Likewise.
* tree-sra.c (sra_elt_hash, sra_elt_eq, lookup_element):
Likewise.
* tree-ssa-alias.c (get_mem_sym_stats_for): Likewise.
* tree-ssa-coalesce.c (compare_pairs): Likewise.
* tree-ssa-loop-im.c (mem_ref_in_stmt, memref_hash, memref_eq,
memref_free, gather_mem_refs_stmt, vtoe_hash, vtoe_eq, vtoe_free,
record_vop_access, get_vop_accesses, get_vop_stores): Likewise.
* tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Likewise.
* tree-ssa-sccvn.c (VN_INFO_GET, free_phi, free_reference,
vn_nary_op_insert): Likewise.
* tree-ssa.c (redirect_edge_var_map_add,
redirect_edge_var_map_clear, redirect_edge_var_map_dup): Likewise.
* tree-vectorizer.c (vectorize_loops): Likewise.
* tree.c (make_node_stat, copy_node_stat, build_int_cst_wide,
build_fixed, build_real, make_tree_binfo_stat, make_tree_vec_stat,
tree_cons_stat, build1_stat, build_variant_type_copy,
decl_init_priority_lookup, decl_fini_priority_lookup,
decl_priority_info, decl_restrict_base_lookup,
decl_restrict_base_insert, decl_debug_expr_lookup,
decl_debug_expr_insert, decl_value_expr_lookup,
decl_value_expr_insert, type_hash_eq, type_hash_lookup,
type_hash_add, get_file_function_name, tree_check_failed,
tree_not_check_failed, tree_range_check_failed,
omp_clause_range_check_failed, build_omp_clause,
build_vl_exp_stat): Likewise.
* value-prof.c (gimple_histogram_value,
gimple_duplicate_stmt_histograms): Likewise.
* var-tracking.c (attrs_list_insert, attrs_list_copy,
unshare_variable, variable_union_info_cmp_pos, variable_union,
dataflow_set_different_1, dataflow_set_different_2,
vt_find_locations, variable_was_changed, set_variable_part,
emit_notes_for_differences_1, emit_notes_for_differences_2):
Likewise.
* varasm.c (prefix_name, emutls_decl, section_entry_eq,
section_entry_hash, object_block_entry_eq,
object_block_entry_hash, create_block_symbol,
initialize_cold_section_name, default_function_rodata_section,
strip_reg_name, set_user_assembler_name, const_desc_eq,
build_constant_desc, output_constant_def, lookup_constant_def,
const_desc_rtx_hash, const_desc_rtx_eq, const_rtx_hash_1,
create_constant_pool, force_const_mem, compute_reloc_for_rtx_1,
default_internal_label): Likewise.
* varray.c (varray_init, varray_grow): Likewise.
* vec.c (vec_gc_o_reserve_1, vec_heap_o_reserve_1): Likewise.
From-SVN: r136992
+2008-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * ggc.h (GGC_RESIZEVAR): New, reorder macros.
+ * tracer.c (tail_duplicate): Fix for -Wc++-compat.
+ * tree-affine.c (aff_combination_expand, free_name_expansion):
+ Likewise.
+ * tree-cfg.c (replace_by_duplicate_decl, replace_ssa_name,
+ move_stmt_r, new_label_mapper): Likewise.
+ * tree-complex.c (cvc_lookup): Likewise.
+ * tree-dfa.c (create_function_ann): Likewise.
+ * tree-dump.c (dump_register): Likewise.
+ * tree-if-conv.c (tree_if_conversion, add_to_predicate_list,
+ find_phi_replacement_condition): Likewise.
+ * tree-inline.c (copy_phis_for_bb, estimate_num_insns_1,
+ tree_function_versioning): Likewise.
+ * tree-into-ssa.c (cmp_dfsnum): Likewise.
+ * tree-iterator.c (tsi_link_before, tsi_link_after): Likewise.
+ * tree-nested.c (lookup_field_for_decl, lookup_tramp_for_decl,
+ get_nonlocal_debug_decl, convert_nonlocal_reference,
+ convert_nonlocal_omp_clauses, get_local_debug_decl,
+ convert_local_reference, convert_local_omp_clauses,
+ convert_nl_goto_reference, convert_nl_goto_receiver,
+ convert_tramp_reference, convert_call_expr): Likewise.
+ * tree-outof-ssa.c (contains_tree_r): Likewise.
+ * tree-parloops.c (reduction_phi, initialize_reductions,
+ eliminate_local_variables_1, add_field_for_reduction,
+ add_field_for_name, create_phi_for_local_result,
+ create_call_for_reduction_1, create_loads_for_reductions,
+ create_stores_for_reduction, create_loads_and_stores_for_name):
+ Likewise.
+ * tree-phinodes.c (allocate_phi_node): Likewise.
+ * tree-predcom.c (order_drefs, execute_pred_commoning_cbck):
+ Likewise.
+ * tree-sra.c (sra_elt_hash, sra_elt_eq, lookup_element):
+ Likewise.
+ * tree-ssa-alias.c (get_mem_sym_stats_for): Likewise.
+ * tree-ssa-coalesce.c (compare_pairs): Likewise.
+ * tree-ssa-loop-im.c (mem_ref_in_stmt, memref_hash, memref_eq,
+ memref_free, gather_mem_refs_stmt, vtoe_hash, vtoe_eq, vtoe_free,
+ record_vop_access, get_vop_accesses, get_vop_stores): Likewise.
+ * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Likewise.
+ * tree-ssa-sccvn.c (VN_INFO_GET, free_phi, free_reference,
+ vn_nary_op_insert): Likewise.
+ * tree-ssa.c (redirect_edge_var_map_add,
+ redirect_edge_var_map_clear, redirect_edge_var_map_dup): Likewise.
+ * tree-vectorizer.c (vectorize_loops): Likewise.
+ * tree.c (make_node_stat, copy_node_stat, build_int_cst_wide,
+ build_fixed, build_real, make_tree_binfo_stat, make_tree_vec_stat,
+ tree_cons_stat, build1_stat, build_variant_type_copy,
+ decl_init_priority_lookup, decl_fini_priority_lookup,
+ decl_priority_info, decl_restrict_base_lookup,
+ decl_restrict_base_insert, decl_debug_expr_lookup,
+ decl_debug_expr_insert, decl_value_expr_lookup,
+ decl_value_expr_insert, type_hash_eq, type_hash_lookup,
+ type_hash_add, get_file_function_name, tree_check_failed,
+ tree_not_check_failed, tree_range_check_failed,
+ omp_clause_range_check_failed, build_omp_clause,
+ build_vl_exp_stat): Likewise.
+ * value-prof.c (gimple_histogram_value,
+ gimple_duplicate_stmt_histograms): Likewise.
+ * var-tracking.c (attrs_list_insert, attrs_list_copy,
+ unshare_variable, variable_union_info_cmp_pos, variable_union,
+ dataflow_set_different_1, dataflow_set_different_2,
+ vt_find_locations, variable_was_changed, set_variable_part,
+ emit_notes_for_differences_1, emit_notes_for_differences_2):
+ Likewise.
+ * varasm.c (prefix_name, emutls_decl, section_entry_eq,
+ section_entry_hash, object_block_entry_eq,
+ object_block_entry_hash, create_block_symbol,
+ initialize_cold_section_name, default_function_rodata_section,
+ strip_reg_name, set_user_assembler_name, const_desc_eq,
+ build_constant_desc, output_constant_def, lookup_constant_def,
+ const_desc_rtx_hash, const_desc_rtx_eq, const_rtx_hash_1,
+ create_constant_pool, force_const_mem, compute_reloc_for_rtx_1,
+ default_internal_label): Likewise.
+ * varray.c (varray_init, varray_grow): Likewise.
+ * vec.c (vec_gc_o_reserve_1, vec_heap_o_reserve_1): Likewise.
+
2008-06-20 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*jcc_fused_1): Handle all valid compare
#define GGC_CNEW(T) ((T *) ggc_alloc_cleared (sizeof (T)))
#define GGC_NEWVEC(T, N) ((T *) ggc_alloc ((N) * sizeof(T)))
#define GGC_CNEWVEC(T, N) ((T *) ggc_alloc_cleared ((N) * sizeof(T)))
+#define GGC_RESIZEVEC(T, P, N) ((T *) ggc_realloc ((P), (N) * sizeof (T)))
#define GGC_NEWVAR(T, S) ((T *) ggc_alloc ((S)))
#define GGC_CNEWVAR(T, S) ((T *) ggc_alloc_cleared ((S)))
-#define GGC_RESIZEVEC(T, P, N) ((T *) ggc_realloc ((P), (N) * sizeof (T)))
+#define GGC_RESIZEVAR(T, P, N) ((T *) ggc_realloc ((P), (N)))
#define ggc_alloc_rtvec(NELT) \
((rtvec) ggc_alloc_zone (sizeof (struct rtvec_def) + ((NELT) - 1) \
while (traced_insns < cover_insns && nduplicated < max_dup_insns
&& !fibheap_empty (heap))
{
- basic_block bb = fibheap_extract_min (heap);
+ basic_block bb = (basic_block) fibheap_extract_min (heap);
int n, pos;
if (!bb)
if (!*cache)
*cache = pointer_map_create ();
slot = pointer_map_insert (*cache, e);
- exp = *slot;
+ exp = (struct name_expansion *) *slot;
if (!exp)
{
free_name_expansion (const void *key ATTRIBUTE_UNUSED, void **value,
void *data ATTRIBUTE_UNUSED)
{
- struct name_expansion *exp = *value;
+ struct name_expansion *const exp = (struct name_expansion *) *value;
free (exp);
return true;
*loc = new_t;
}
else
- new_t = *loc;
+ new_t = (tree) *loc;
*tp = new_t;
}
*loc = new_name;
}
else
- new_name = *loc;
+ new_name = (tree) *loc;
return new_name;
}
{
struct tree_map in, *out;
in.base.from = t;
- out = htab_find_with_hash (p->new_label_map, &in, DECL_UID (t));
+ out = (struct tree_map *)
+ htab_find_with_hash (p->new_label_map, &in, DECL_UID (t));
if (out)
*tp = t = out->to;
}
gcc_assert (TREE_CODE (decl) == LABEL_DECL);
- m = xmalloc (sizeof (struct tree_map));
+ m = XNEW (struct tree_map);
m->hash = DECL_UID (decl);
m->base.from = decl;
m->to = create_artificial_label ();
{
struct int_tree_map *h, in;
in.uid = uid;
- h = htab_find_with_hash (complex_variable_components, &in, uid);
+ h = (struct int_tree_map *) htab_find_with_hash (complex_variable_components, &in, uid);
return h ? h->to : NULL;
}
gcc_assert (TREE_CODE (t) == FUNCTION_DECL);
gcc_assert (!t->base.ann || t->base.ann->common.type == FUNCTION_ANN);
- ann = ggc_alloc (sizeof (*ann));
+ ann = (function_ann_t) ggc_alloc (sizeof (*ann));
memset ((void *) ann, 0, sizeof (*ann));
ann->common.type = FUNCTION_ANN;
extra_dump_files_alloced = 32;
else
extra_dump_files_alloced *= 2;
- extra_dump_files = xrealloc (extra_dump_files,
- sizeof (struct dump_file_info)
- * extra_dump_files_alloced);
+ extra_dump_files = XRESIZEVEC (struct dump_file_info,
+ extra_dump_files,
+ extra_dump_files_alloced);
}
memset (&extra_dump_files[this], 0, sizeof (struct dump_file_info));
bb = ifc_bbs [i];
/* Update condition using predicate list. */
- cond = bb->aux;
+ cond = (tree) bb->aux;
/* Process all statements in this basic block.
Remove conditional expression, if any, and annotate
static void
add_to_predicate_list (basic_block bb, tree new_cond)
{
- tree cond = bb->aux;
+ tree cond = (tree) bb->aux;
if (cond)
cond = fold_build2 (TRUTH_OR_EXPR, boolean_type_node,
See PR23115. */
/* Select condition that is not TRUTH_NOT_EXPR. */
- tmp_cond = (first_edge->src)->aux;
+ tmp_cond = (tree) (first_edge->src)->aux;
gcc_assert (tmp_cond);
if (TREE_CODE (tmp_cond) == TRUTH_NOT_EXPR)
|| dominated_by_p (CDI_DOMINATORS,
second_edge->src, first_edge->src))
{
- *cond = (second_edge->src)->aux;
+ *cond = (tree) (second_edge->src)->aux;
/* If there is a condition on an incoming edge,
AND it with the incoming bb predicate. */
if (second_edge->aux)
*cond = build2 (TRUTH_AND_EXPR, boolean_type_node,
- *cond, second_edge->aux);
+ *cond, (tree) second_edge->aux);
if (TREE_CODE (*cond) == TRUTH_NOT_EXPR)
/* We can be smart here and choose inverted
else
{
/* FIRST_BB is not loop header */
- *cond = (first_edge->src)->aux;
+ *cond = (tree) (first_edge->src)->aux;
/* If there is a condition on an incoming edge,
AND it with the incoming bb predicate. */
if (first_edge->aux)
*cond = build2 (TRUTH_AND_EXPR, boolean_type_node,
- *cond, first_edge->aux);
+ *cond, (tree) first_edge->aux);
}
/* Create temp. for the condition. Vectorizer prefers to have gimple
static void
copy_phis_for_bb (basic_block bb, copy_body_data *id)
{
- basic_block new_bb = bb->aux;
+ basic_block const new_bb = (basic_block) bb->aux;
edge_iterator ei;
tree phi;
= new_phi = create_phi_node (new_res, new_bb);
FOR_EACH_EDGE (new_edge, ei, new_bb->preds)
{
- edge old_edge = find_edge (new_edge->src->aux, bb);
+ edge const old_edge = find_edge ((basic_block) new_edge->src->aux, bb);
tree arg = PHI_ARG_DEF_FROM_EDGE (phi, old_edge);
tree new_arg = arg;
static tree
estimate_num_insns_1 (tree *tp, int *walk_subtrees, void *data)
{
- struct eni_data *d = data;
+ struct eni_data *const d = (struct eni_data *) data;
tree x = *tp;
unsigned cost;
if (tree_map)
for (i = 0; i < VARRAY_ACTIVE_SIZE (tree_map); i++)
{
- replace_info = VARRAY_GENERIC_PTR (tree_map, i);
+ replace_info = (struct ipa_replace_map *) VARRAY_GENERIC_PTR (tree_map, i);
if (replace_info->replace_p)
insert_decl_map (&id, replace_info->old_tree,
replace_info->new_tree);
static int
cmp_dfsnum (const void *a, const void *b)
{
- const struct dom_dfsnum *da = a;
- const struct dom_dfsnum *db = b;
+ const struct dom_dfsnum *const da = (const struct dom_dfsnum *) a;
+ const struct dom_dfsnum *const db = (const struct dom_dfsnum *) b;
return (int) da->dfs_num - (int) db->dfs_num;
}
}
else
{
- head = ggc_alloc (sizeof (*head));
+ head = GGC_NEW (struct tree_statement_list_node);
head->prev = NULL;
head->next = NULL;
head->stmt = t;
}
else
{
- head = ggc_alloc (sizeof (*head));
+ head = GGC_NEW (struct tree_statement_list_node);
head->prev = NULL;
head->next = NULL;
head->stmt = t;
if (insert == NO_INSERT)
{
slot = pointer_map_contains (info->field_map, decl);
- return slot ? *slot : NULL;
+ return slot ? (tree) *slot : NULL_TREE;
}
slot = pointer_map_insert (info->field_map, decl);
info->any_parm_remapped = true;
}
- return *slot;
+ return (tree) *slot;
}
/* Build or return the variable that holds the static chain within
if (insert == NO_INSERT)
{
slot = pointer_map_contains (info->var_map, decl);
- return slot ? *slot : NULL;
+ return slot ? (tree) *slot : NULL_TREE;
}
slot = pointer_map_insert (info->var_map, decl);
info->any_tramp_created = true;
}
- return *slot;
+ return (tree) *slot;
}
/* Build or return the field within the non-local frame state that holds
slot = pointer_map_insert (info->var_map, decl);
if (*slot)
- return *slot;
+ return (tree) *slot;
target_context = decl_function_context (decl);
convert_nonlocal_reference (tree *tp, int *walk_subtrees, void *data)
{
struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
- struct nesting_info *info = wi->info;
+ struct nesting_info *const info = (struct nesting_info *) wi->info;
tree t = *tp;
tree save_local_var_chain;
bitmap save_suppress;
where we only accept variables (and min_invariant, presumably),
then compute the address into a temporary. */
if (save_val_only)
- *tp = tsi_gimplify_val (wi->info, t, &wi->tsi);
+ *tp = tsi_gimplify_val ((struct nesting_info *) wi->info,
+ t, &wi->tsi);
}
}
break;
static bool
convert_nonlocal_omp_clauses (tree *pclauses, struct walk_stmt_info *wi)
{
- struct nesting_info *info = wi->info;
+ struct nesting_info *const info = (struct nesting_info *) wi->info;
bool need_chain = false, need_stmts = false;
tree clause, decl;
int dummy;
slot = pointer_map_insert (info->var_map, decl);
if (*slot)
- return *slot;
+ return (tree) *slot;
/* Make sure frame_decl gets created. */
(void) get_frame_type (info);
convert_local_reference (tree *tp, int *walk_subtrees, void *data)
{
struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
- struct nesting_info *info = wi->info;
+ struct nesting_info *const info = (struct nesting_info *) wi->info;
tree t = *tp, field, x;
bool save_val_only;
tree save_local_var_chain;
/* If we are in a context where we only accept values, then
compute the address into a temporary. */
if (save_val_only)
- *tp = tsi_gimplify_val (wi->info, t, &wi->tsi);
+ *tp = tsi_gimplify_val ((struct nesting_info *)wi->info, t, &wi->tsi);
}
break;
static bool
convert_local_omp_clauses (tree *pclauses, struct walk_stmt_info *wi)
{
- struct nesting_info *info = wi->info;
+ struct nesting_info *const info = (struct nesting_info *) wi->info;
bool need_frame = false, need_stmts = false;
tree clause, decl;
int dummy;
convert_nl_goto_reference (tree *tp, int *walk_subtrees, void *data)
{
struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
- struct nesting_info *info = wi->info, *i;
+ struct nesting_info *const info = (struct nesting_info *) wi->info, *i;
tree t = *tp, label, new_label, target_context, x, field;
void **slot;
*slot = new_label;
}
else
- new_label = *slot;
+ new_label = (tree) *slot;
/* Build: __builtin_nl_goto(new_label, &chain->nl_goto_field). */
field = get_nl_goto_field (i);
convert_nl_goto_receiver (tree *tp, int *walk_subtrees, void *data)
{
struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
- struct nesting_info *info = wi->info;
+ struct nesting_info *const info = (struct nesting_info *) wi->info;
tree t = *tp, label, new_label, x;
tree_stmt_iterator tmp_tsi;
void **slot;
convert_tramp_reference (tree *tp, int *walk_subtrees, void *data)
{
struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
- struct nesting_info *info = wi->info, *i;
+ struct nesting_info *const info = (struct nesting_info *) wi->info, *i;
tree t = *tp, decl, target_context, x;
*walk_subtrees = 0;
convert_call_expr (tree *tp, int *walk_subtrees, void *data)
{
struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
- struct nesting_info *info = wi->info;
+ struct nesting_info *const info = (struct nesting_info *) wi->info;
tree t = *tp, decl, target_context;
char save_static_chain_added;
int i;
if (*tp == data)
{
*walk_subtrees = 0;
- return data;
+ return (tree) data;
}
else
return NULL_TREE;
return NULL;
tmpred.reduc_phi = phi;
- red = htab_find (reduction_list, &tmpred);
+ red = (struct reduction_info *) htab_find (reduction_list, &tmpred);
return red;
}
tree bvar, type, arg;
edge e;
- struct reduction_info *reduc = *slot;
+ struct reduction_info *const reduc = (struct reduction_info *) *slot;
struct loop *loop = (struct loop *) data;
/* Create initialization in preheader:
static tree
eliminate_local_variables_1 (tree *tp, int *walk_subtrees, void *data)
{
- struct elv_data *dta = data;
+ struct elv_data *const dta = (struct elv_data *) data;
tree t = *tp, var, addr, addr_type, type, obj;
if (DECL_P (t))
add_field_for_reduction (void **slot, void *data)
{
- struct reduction_info *red = *slot;
- tree type = data;
+ struct reduction_info *const red = (struct reduction_info *) *slot;
+ tree const type = (tree) data;
tree var = SSA_NAME_VAR (GIMPLE_STMT_OPERAND (red->reduc_stmt, 0));
tree field = build_decl (FIELD_DECL, DECL_NAME (var), TREE_TYPE (var));
static int
add_field_for_name (void **slot, void *data)
{
- struct name_to_copy_elt *elt = *slot;
- tree type = data;
+ struct name_to_copy_elt *const elt = (struct name_to_copy_elt *) *slot;
+ tree type = (tree) data;
tree name = ssa_name (elt->version);
tree var = SSA_NAME_VAR (name);
tree field = build_decl (FIELD_DECL, DECL_NAME (var), TREE_TYPE (var));
static int
create_phi_for_local_result (void **slot, void *data)
{
- struct reduction_info *reduc = *slot;
- struct loop *loop = data;
+ struct reduction_info *const reduc = (struct reduction_info *) *slot;
+ const struct loop *const loop = (const struct loop *) data;
edge e;
tree new_phi;
basic_block store_bb;
static int
create_call_for_reduction_1 (void **slot, void *data)
{
- struct reduction_info *reduc = *slot;
- struct clsn_data *clsn_data = data;
+ struct reduction_info *const reduc = (struct reduction_info *) *slot;
+ struct clsn_data *const clsn_data = (struct clsn_data *) data;
block_stmt_iterator bsi;
tree type = TREE_TYPE (PHI_RESULT (reduc->reduc_phi));
tree struct_type = TREE_TYPE (TREE_TYPE (clsn_data->load));
static int
create_loads_for_reductions (void **slot, void *data)
{
- struct reduction_info *red = *slot;
- struct clsn_data *clsn_data = data;
+ struct reduction_info *const red = (struct reduction_info *) *slot;
+ struct clsn_data *const clsn_data = (struct clsn_data *) data;
tree stmt;
block_stmt_iterator bsi;
tree type = TREE_TYPE (GIMPLE_STMT_OPERAND (red->reduc_stmt, 0));
static int
create_stores_for_reduction (void **slot, void *data)
{
- struct reduction_info *red = *slot;
- struct clsn_data *clsn_data = data;
+ struct reduction_info *const red = (struct reduction_info *) *slot;
+ struct clsn_data *const clsn_data = (struct clsn_data *) data;
tree stmt;
block_stmt_iterator bsi;
tree type = TREE_TYPE (GIMPLE_STMT_OPERAND (red->reduc_stmt, 0));
static int
create_loads_and_stores_for_name (void **slot, void *data)
{
- struct name_to_copy_elt *elt = *slot;
- struct clsn_data *clsn_data = data;
+ struct name_to_copy_elt *const elt = (struct name_to_copy_elt *) *slot;
+ struct clsn_data *const clsn_data = (struct clsn_data *) data;
tree stmt;
block_stmt_iterator bsi;
tree type = TREE_TYPE (elt->new_name);
}
else
{
- phi = ggc_alloc (size);
+ phi = (tree) ggc_alloc (size);
#ifdef GATHER_STATISTICS
phi_nodes_created++;
tree_node_counts[(int) phi_kind]++;
static int
order_drefs (const void *a, const void *b)
{
- const dref *da = a;
- const dref *db = b;
+ const dref *const da = (const dref *) a;
+ const dref *const db = (const dref *) b;
int offcmp = double_int_scmp ((*da)->offset, (*db)->offset);
if (offcmp != 0)
static void
execute_pred_commoning_cbck (struct loop *loop, void *data)
{
- struct epcc_data *dta = data;
+ struct epcc_data *const dta = (struct epcc_data *) data;
/* Restore phi nodes that were replaced by ssa names before
tree_transform_and_unroll_loop (see detailed description in
static hashval_t
sra_elt_hash (const void *x)
{
- const struct sra_elt *e = x;
+ const struct sra_elt *const e = (const struct sra_elt *) x;
const struct sra_elt *p;
hashval_t h;
static int
sra_elt_eq (const void *x, const void *y)
{
- const struct sra_elt *a = x;
- const struct sra_elt *b = y;
+ const struct sra_elt *const a = (const struct sra_elt *) x;
+ const struct sra_elt *const b = (const struct sra_elt *) y;
tree ae, be;
const struct sra_elt *ap = a->parent;
const struct sra_elt *bp = b->parent;
elt = *slot;
if (!elt && insert == INSERT)
{
- *slot = elt = obstack_alloc (&sra_obstack, sizeof (*elt));
+ *slot = elt = XOBNEW (&sra_obstack, struct sra_elt);
memset (elt, 0, sizeof (*elt));
elt->parent = parent;
slot = pointer_map_insert (map, var);
if (*slot == NULL)
{
- stats = pool_alloc (mem_sym_stats_pool);
+ stats = (struct mem_sym_stats_d *) pool_alloc (mem_sym_stats_pool);
memset (stats, 0, sizeof (*stats));
stats->var = var;
*slot = (void *) stats;
static int
compare_pairs (const void *p1, const void *p2)
{
- const_coalesce_pair_p const * pp1 = p1;
- const_coalesce_pair_p const * pp2 = p2;
+ const_coalesce_pair_p const *const pp1 = (const_coalesce_pair_p const *) p1;
+ const_coalesce_pair_p const *const pp2 = (const_coalesce_pair_p const *) p2;
int result;
result = (* pp2)->cost - (* pp1)->cost;
gcc_assert (!store);
hash = iterative_hash_expr (*mem, 0);
- ref = htab_find_with_hash (memory_accesses.refs, *mem, hash);
+ ref = (mem_ref_p) htab_find_with_hash (memory_accesses.refs, *mem, hash);
gcc_assert (ref != NULL);
return ref;
static hashval_t
memref_hash (const void *obj)
{
- const struct mem_ref *mem = obj;
+ const struct mem_ref *const mem = (const struct mem_ref *) obj;
return mem->hash;
}
static int
memref_eq (const void *obj1, const void *obj2)
{
- const struct mem_ref *mem1 = obj1;
+ const struct mem_ref *const mem1 = (const struct mem_ref *) obj1;
- return operand_equal_p (mem1->mem, (tree) obj2, 0);
+ return operand_equal_p (mem1->mem, (const_tree) obj2, 0);
}
/* Releases list of memory reference locations ACCS. */
static void
memref_free (void *obj)
{
- struct mem_ref *mem = obj;
+ struct mem_ref *const mem = (struct mem_ref *) obj;
unsigned i;
mem_ref_locs_p accs;
if (*slot)
{
- ref = *slot;
+ ref = (mem_ref_p) *slot;
id = ref->id;
}
else
static hashval_t
vtoe_hash (const void *obj)
{
- const struct vop_to_refs_elt *vtoe = obj;
+ const struct vop_to_refs_elt *const vtoe =
+ (const struct vop_to_refs_elt *) obj;
return vtoe->uid;
}
static int
vtoe_eq (const void *obj1, const void *obj2)
{
- const struct vop_to_refs_elt *vtoe = obj1;
- const unsigned *uid = obj2;
+ const struct vop_to_refs_elt *const vtoe =
+ (const struct vop_to_refs_elt *) obj1;
+ const unsigned *const uid = (const unsigned *) obj2;
return vtoe->uid == *uid;
}
static void
vtoe_free (void *obj)
{
- struct vop_to_refs_elt *vtoe = obj;
+ struct vop_to_refs_elt *const vtoe =
+ (struct vop_to_refs_elt *) obj;
BITMAP_FREE (vtoe->refs_all);
BITMAP_FREE (vtoe->refs_stored);
*slot = vtoe;
}
else
- vtoe = *slot;
+ vtoe = (struct vop_to_refs_elt *) *slot;
bitmap_set_bit (vtoe->refs_all, ref);
if (stored)
static bitmap
get_vop_accesses (htab_t vop_to_refs, unsigned vop)
{
- struct vop_to_refs_elt *vtoe = htab_find_with_hash (vop_to_refs, &vop, vop);
+ struct vop_to_refs_elt *const vtoe =
+ (struct vop_to_refs_elt *) htab_find_with_hash (vop_to_refs, &vop, vop);
return vtoe->refs_all;
}
static bitmap
get_vop_stores (htab_t vop_to_refs, unsigned vop)
{
- struct vop_to_refs_elt *vtoe = htab_find_with_hash (vop_to_refs, &vop, vop);
+ struct vop_to_refs_elt *const vtoe =
+ (struct vop_to_refs_elt *) htab_find_with_hash (vop_to_refs, &vop, vop);
return vtoe->refs_stored;
}
for (i = 0; VEC_iterate (data_reference_p, datarefs, i, dr); i++)
{
dist = self_reuse_distance (dr, loop_data_size, n, loop);
- ref = dr->aux;
+ ref = (struct mem_ref *) dr->aux;
if (ref->reuse_distance > dist)
ref->reuse_distance = dist;
if (DDR_ARE_DEPENDENT (dep) == chrec_known)
continue;
- ref = DDR_A (dep)->aux;
- refb = DDR_B (dep)->aux;
+ ref = (struct mem_ref *) DDR_A (dep)->aux;
+ refb = (struct mem_ref *) DDR_B (dep)->aux;
if (DDR_ARE_DEPENDENT (dep) == chrec_dont_know
|| DDR_NUM_DIST_VECTS (dep) == 0)
{
vn_ssa_aux_t newinfo;
- newinfo = obstack_alloc (&vn_ssa_aux_obstack, sizeof (struct vn_ssa_aux));
+ newinfo = XOBNEW (&vn_ssa_aux_obstack, struct vn_ssa_aux);
memset (newinfo, 0, sizeof (struct vn_ssa_aux));
if (SSA_NAME_VERSION (name) >= VEC_length (vn_ssa_aux_t, vn_ssa_aux_table))
VEC_safe_grow (vn_ssa_aux_t, heap, vn_ssa_aux_table,
static void
free_phi (void *vp)
{
- vn_phi_t phi = vp;
+ vn_phi_t phi = (vn_phi_t) vp;
VEC_free (tree, heap, phi->phiargs);
}
static void
free_reference (void *vp)
{
- vn_reference_t vr = vp;
+ vn_reference_t vr = (vn_reference_t) vp;
VEC_free (vn_reference_op_s, heap, vr->operands);
}
vn_nary_op_t vno1;
unsigned i;
- vno1 = obstack_alloc (¤t_info->nary_obstack,
+ vno1 = (vn_nary_op_t) obstack_alloc (¤t_info->nary_obstack,
(sizeof (struct vn_nary_op_s)
- sizeof (tree) * (4 - length)));
vno1->opcode = TREE_CODE (op);
edge_var_maps = pointer_map_create ();
slot = pointer_map_insert (edge_var_maps, e);
- old_head = head = *slot;
+ old_head = head = (edge_var_map_vector) *slot;
if (!head)
{
head = VEC_alloc (edge_var_map, heap, 5);
if (slot)
{
- head = *slot;
+ head = (edge_var_map_vector) *slot;
VEC_free (edge_var_map, heap, head);
*slot = NULL;
}
old_slot = pointer_map_contains (edge_var_maps, olde);
if (!old_slot)
return;
- head = *old_slot;
+ head = (edge_var_map_vector) *old_slot;
if (head)
*new_slot = VEC_copy (edge_var_map, heap, head);
loop = get_loop (i);
if (!loop)
continue;
- loop_vinfo = loop->aux;
+ loop_vinfo = (loop_vec_info) loop->aux;
destroy_loop_vec_info (loop_vinfo, true);
loop->aux = NULL;
}
#endif
if (code == IDENTIFIER_NODE)
- t = ggc_alloc_zone_pass_stat (length, &tree_id_zone);
+ t = (tree) ggc_alloc_zone_pass_stat (length, &tree_id_zone);
else
- t = ggc_alloc_zone_pass_stat (length, &tree_zone);
+ t = (tree) ggc_alloc_zone_pass_stat (length, &tree_zone);
memset (t, 0, length);
gcc_assert (code != STATEMENT_LIST);
length = tree_size (node);
- t = ggc_alloc_zone_pass_stat (length, &tree_zone);
+ t = (tree) ggc_alloc_zone_pass_stat (length, &tree_zone);
memcpy (t, node, length);
if (!GIMPLE_TUPLE_P (node))
TREE_TYPE (int_cst_node) = type;
slot = htab_find_slot (int_cst_hash_table, int_cst_node, INSERT);
- t = *slot;
+ t = (tree) *slot;
if (!t)
{
/* Insert this one into the hash table. */
FIXED_VALUE_TYPE *fp;
v = make_node (FIXED_CST);
- fp = ggc_alloc (sizeof (FIXED_VALUE_TYPE));
+ fp = GGC_NEW (FIXED_VALUE_TYPE);
memcpy (fp, &f, sizeof (FIXED_VALUE_TYPE));
TREE_TYPE (v) = type;
Consider doing it via real_convert now. */
v = make_node (REAL_CST);
- dp = ggc_alloc (sizeof (REAL_VALUE_TYPE));
+ dp = GGC_NEW (REAL_VALUE_TYPE);
memcpy (dp, &d, sizeof (REAL_VALUE_TYPE));
TREE_TYPE (v) = type;
tree_node_sizes[(int) binfo_kind] += length;
#endif
- t = ggc_alloc_zone_pass_stat (length, &tree_zone);
+ t = (tree) ggc_alloc_zone_pass_stat (length, &tree_zone);
memset (t, 0, offsetof (struct tree_binfo, base_binfos));
tree_node_sizes[(int) vec_kind] += length;
#endif
- t = ggc_alloc_zone_pass_stat (length, &tree_zone);
+ t = (tree) ggc_alloc_zone_pass_stat (length, &tree_zone);
memset (t, 0, length);
{
tree node;
- node = ggc_alloc_zone_pass_stat (sizeof (struct tree_list), &tree_zone);
+ node = (tree) ggc_alloc_zone_pass_stat (sizeof (struct tree_list), &tree_zone);
memset (node, 0, sizeof (struct tree_common));
gcc_assert (TREE_CODE_LENGTH (code) == 1);
- t = ggc_alloc_zone_pass_stat (length, &tree_zone);
+ t = (tree) ggc_alloc_zone_pass_stat (length, &tree_zone);
memset (t, 0, sizeof (struct tree_common));
int
tree_map_base_eq (const void *va, const void *vb)
{
- const struct tree_map_base *const a = va, *const b = vb;
+ const struct tree_map_base *const a = (const struct tree_map_base *) va,
+ *const b = (const struct tree_map_base *) vb;
return (a->from == b->from);
}
gcc_assert (VAR_OR_FUNCTION_DECL_P (decl));
in.from = decl;
- h = htab_find (init_priority_for_decl, &in);
+ h = (struct tree_priority_map *) htab_find (init_priority_for_decl, &in);
return h ? h->init : DEFAULT_INIT_PRIORITY;
}
gcc_assert (TREE_CODE (decl) == FUNCTION_DECL);
in.from = decl;
- h = htab_find (init_priority_for_decl, &in);
+ h = (struct tree_priority_map *) htab_find (init_priority_for_decl, &in);
return h ? h->fini : DEFAULT_INIT_PRIORITY;
}
in.base.from = decl;
loc = htab_find_slot (init_priority_for_decl, &in, INSERT);
- h = *loc;
+ h = (struct tree_priority_map *) *loc;
if (!h)
{
h = GGC_CNEW (struct tree_priority_map);
struct tree_map in;
in.base.from = from;
- h = htab_find_with_hash (restrict_base_for_decl, &in,
- htab_hash_pointer (from));
+ h = (struct tree_map *) htab_find_with_hash (restrict_base_for_decl, &in,
+ htab_hash_pointer (from));
return h ? h->to : NULL_TREE;
}
struct tree_map *h;
void **loc;
- h = ggc_alloc (sizeof (struct tree_map));
+ h = GGC_NEW (struct tree_map);
h->hash = htab_hash_pointer (from);
h->base.from = from;
h->to = to;
struct tree_map *h, in;
in.base.from = from;
- h = htab_find_with_hash (debug_expr_for_decl, &in, htab_hash_pointer (from));
+ h = (struct tree_map *) htab_find_with_hash (debug_expr_for_decl, &in,
+ htab_hash_pointer (from));
if (h)
return h->to;
return NULL_TREE;
struct tree_map *h;
void **loc;
- h = ggc_alloc (sizeof (struct tree_map));
+ h = GGC_NEW (struct tree_map);
h->hash = htab_hash_pointer (from);
h->base.from = from;
h->to = to;
struct tree_map *h, in;
in.base.from = from;
- h = htab_find_with_hash (value_expr_for_decl, &in, htab_hash_pointer (from));
+ h = (struct tree_map *) htab_find_with_hash (value_expr_for_decl, &in,
+ htab_hash_pointer (from));
if (h)
return h->to;
return NULL_TREE;
struct tree_map *h;
void **loc;
- h = ggc_alloc (sizeof (struct tree_map));
+ h = GGC_NEW (struct tree_map);
h->hash = htab_hash_pointer (from);
h->base.from = from;
h->to = to;
static int
type_hash_eq (const void *va, const void *vb)
{
- const struct type_hash *const a = va, *const b = vb;
+ const struct type_hash *const a = (const struct type_hash *) va,
+ *const b = (const struct type_hash *) vb;
/* First test the things that are the same for all types. */
if (a->hash != b->hash
in.hash = hashcode;
in.type = type;
- h = htab_find_with_hash (type_hash_table, &in, hashcode);
+ h = (struct type_hash *) htab_find_with_hash (type_hash_table, &in,
+ hashcode);
if (h)
return h->type;
return NULL_TREE;
struct type_hash *h;
void **loc;
- h = ggc_alloc (sizeof (struct type_hash));
+ h = GGC_NEW (struct type_hash);
h->hash = hashcode;
h->type = type;
loc = htab_find_slot_with_hash (type_hash_table, h, hashcode, INSERT);
file = input_filename;
len = strlen (file);
- q = alloca (9 * 2 + len + 1);
+ q = (char *) alloca (9 * 2 + len + 1);
memcpy (q, file, len + 1);
clean_symbol_name (q);
p = q;
}
- buf = alloca (sizeof (FILE_FUNCTION_FORMAT) + strlen (p) + strlen (type));
+ buf = (char *) alloca (sizeof (FILE_FUNCTION_FORMAT) + strlen (p)
+ + strlen (type));
/* Set up the name of the file-level functions we may need.
Use a global object (which is already required to be unique over
char *tmp;
va_start (args, function);
length += strlen ("expected ");
- buffer = tmp = alloca (length);
+ buffer = tmp = (char *) alloca (length);
length = 0;
while ((code = va_arg (args, int)))
{
length += 4 + strlen (tree_code_name[code]);
va_end (args);
va_start (args, function);
- buffer = alloca (length);
+ buffer = (char *) alloca (length);
length = 0;
while ((code = va_arg (args, int)))
{
length += 4 + strlen (tree_code_name[c]);
length += strlen ("expected ");
- buffer = alloca (length);
+ buffer = (char *) alloca (length);
length = 0;
for (c = c1; c <= c2; ++c)
length += 4 + strlen (omp_clause_code_name[c]);
length += strlen ("expected ");
- buffer = alloca (length);
+ buffer = (char *) alloca (length);
length = 0;
for (c = c1; c <= c2; ++c)
length = omp_clause_num_ops[code];
size = (sizeof (struct tree_omp_clause) + (length - 1) * sizeof (tree));
- t = ggc_alloc (size);
+ t = GGC_NEWVAR (union tree_node, size);
memset (t, 0, size);
TREE_SET_CODE (t, OMP_CLAUSE);
OMP_CLAUSE_SET_CODE (t, code);
tree_node_sizes[(int) e_kind] += length;
#endif
- t = ggc_alloc_zone_pass_stat (length, &tree_zone);
+ t = (tree) ggc_alloc_zone_pass_stat (length, &tree_zone);
memset (t, 0, length);
{
if (!VALUE_HISTOGRAMS (fun))
return NULL;
- return htab_find_with_hash (VALUE_HISTOGRAMS (fun), stmt,
- htab_hash_pointer (stmt));
+ return (histogram_value) htab_find_with_hash (VALUE_HISTOGRAMS (fun), stmt,
+ htab_hash_pointer (stmt));
}
/* Add histogram for STMT. */
histogram_value new = gimple_alloc_histogram_value (fun, val->type, NULL, NULL);
memcpy (new, val, sizeof (*val));
new->hvalue.stmt = stmt;
- new->hvalue.counters = xmalloc (sizeof (*new->hvalue.counters) * new->n_counters);
+ new->hvalue.counters = XNEWVAR (gcov_type, sizeof (*new->hvalue.counters) * new->n_counters);
memcpy (new->hvalue.counters, val->hvalue.counters, sizeof (*new->hvalue.counters) * new->n_counters);
gimple_add_histogram_value (fun, stmt, new);
}
{
attrs list;
- list = pool_alloc (attrs_pool);
+ list = (attrs) pool_alloc (attrs_pool);
list->loc = loc;
list->decl = decl;
list->offset = offset;
attrs_list_clear (dstp);
for (; src; src = src->next)
{
- n = pool_alloc (attrs_pool);
+ n = (attrs) pool_alloc (attrs_pool);
n->loc = src->loc;
n->decl = src->decl;
n->offset = src->offset;
variable new_var;
int i;
- new_var = pool_alloc (var_pool);
+ new_var = (variable) pool_alloc (var_pool);
new_var->decl = var->decl;
new_var->refcount = 1;
var->refcount--;
{
location_chain new_lc;
- new_lc = pool_alloc (loc_chain_pool);
+ new_lc = (location_chain) pool_alloc (loc_chain_pool);
new_lc->next = NULL;
if (node->init > initialized)
new_lc->init = node->init;
static int
variable_union_info_cmp_pos (const void *n1, const void *n2)
{
- const struct variable_union_info *i1 = n1;
- const struct variable_union_info *i2 = n2;
+ const struct variable_union_info *const i1 =
+ (const struct variable_union_info *) n1;
+ const struct variable_union_info *const i2 =
+ ( const struct variable_union_info *) n2;
if (i1->pos != i2->pos)
return i1->pos - i2->pos;
location_chain new_node;
/* Copy the location from SRC. */
- new_node = pool_alloc (loc_chain_pool);
+ new_node = (location_chain) pool_alloc (loc_chain_pool);
new_node->loc = node->loc;
new_node->init = node->init;
if (!node->set_src || MEM_P (node->set_src))
{
location_chain new_lc;
- new_lc = pool_alloc (loc_chain_pool);
+ new_lc = (location_chain) pool_alloc (loc_chain_pool);
new_lc->next = NULL;
new_lc->init = node->init;
if (!node->set_src || MEM_P (node->set_src))
variable var1, var2;
var1 = *(variable *) slot;
- var2 = htab_find_with_hash (htab, var1->decl,
+ var2 = (variable) htab_find_with_hash (htab, var1->decl,
VARIABLE_HASH_VAL (var1->decl));
if (!var2)
{
variable var1, var2;
var1 = *(variable *) slot;
- var2 = htab_find_with_hash (htab, var1->decl,
+ var2 = (variable) htab_find_with_hash (htab, var1->decl,
VARIABLE_HASH_VAL (var1->decl));
if (!var2)
{
while (!fibheap_empty (worklist))
{
- bb = fibheap_extract_min (worklist);
+ bb = (basic_block) fibheap_extract_min (worklist);
RESET_BIT (in_worklist, bb->index);
if (!TEST_BIT (visited, bb->index))
{
variable empty_var;
void **old;
- empty_var = pool_alloc (var_pool);
+ empty_var = (variable) pool_alloc (var_pool);
empty_var->decl = var->decl;
empty_var->refcount = 1;
empty_var->n_var_parts = 0;
if (!*slot)
{
/* Create new variable information. */
- var = pool_alloc (var_pool);
+ var = (variable) pool_alloc (var_pool);
var->decl = decl;
var->refcount = 1;
var->n_var_parts = 1;
}
/* Add the location to the beginning. */
- node = pool_alloc (loc_chain_pool);
+ node = (location_chain) pool_alloc (loc_chain_pool);
node->loc = loc;
node->init = initialized;
node->set_src = set_src;
variable old_var, new_var;
old_var = *(variable *) slot;
- new_var = htab_find_with_hash (new_vars, old_var->decl,
+ new_var = (variable) htab_find_with_hash (new_vars, old_var->decl,
VARIABLE_HASH_VAL (old_var->decl));
if (!new_var)
/* Variable has disappeared. */
variable empty_var;
- empty_var = pool_alloc (var_pool);
+ empty_var = (variable) pool_alloc (var_pool);
empty_var->decl = old_var->decl;
empty_var->refcount = 1;
empty_var->n_var_parts = 0;
variable old_var, new_var;
new_var = *(variable *) slot;
- old_var = htab_find_with_hash (old_vars, new_var->decl,
+ old_var = (variable) htab_find_with_hash (old_vars, new_var->decl,
VARIABLE_HASH_VAL (new_var->decl));
if (!old_var)
{
{
unsigned plen = strlen (prefix);
unsigned nlen = strlen (IDENTIFIER_POINTER (name));
- char *toname = alloca (plen + nlen + 1);
+ char *toname = (char *) alloca (plen + nlen + 1);
memcpy (toname, prefix, plen);
memcpy (toname + plen, IDENTIFIER_POINTER (name), nlen + 1);
in.hash = htab_hash_string (IDENTIFIER_POINTER (name));
in.base.from = decl;
loc = htab_find_slot_with_hash (emutls_htab, &in, in.hash, INSERT);
- h = *loc;
+ h = (struct tree_map *) *loc;
if (h != NULL)
to = h->to;
else
to = build_decl (VAR_DECL, get_emutls_object_name (name),
get_emutls_object_type ());
- h = ggc_alloc (sizeof (struct tree_map));
+ h = GGC_NEW (struct tree_map);
h->hash = in.hash;
h->base.from = decl;
h->to = to;
static int
section_entry_eq (const void *p1, const void *p2)
{
- const section *old = p1;
- const char *new = p2;
+ const section *old = (const section *) p1;
+ const char *new = (const char *) p2;
return strcmp (old->named.name, new) == 0;
}
static hashval_t
section_entry_hash (const void *p)
{
- const section *old = p;
+ const section *old = (const section *) p;
return htab_hash_string (old->named.name);
}
static int
object_block_entry_eq (const void *p1, const void *p2)
{
- const struct object_block *old = p1;
- const section *new = p2;
+ const struct object_block *old = (const struct object_block *) p1;
+ const section *new = (const section *) p2;
return old->sect == new;
}
static hashval_t
object_block_entry_hash (const void *p)
{
- const struct object_block *old = p;
+ const struct object_block *old = (const struct object_block *) p;
return hash_section (old->sect);
}
/* Create the extended SYMBOL_REF. */
size = RTX_HDR_SIZE + sizeof (struct block_symbol);
- symbol = ggc_alloc_zone (size, &rtl_zone);
+ symbol = (rtx) ggc_alloc_zone (size, &rtl_zone);
/* Initialize the normal SYMBOL_REF fields. */
memset (symbol, 0, size);
dsn = DECL_SECTION_NAME (current_function_decl);
if (flag_function_sections && dsn)
{
- name = alloca (TREE_STRING_LENGTH (dsn) + 1);
+ name = (char *) alloca (TREE_STRING_LENGTH (dsn) + 1);
memcpy (name, TREE_STRING_POINTER (dsn), TREE_STRING_LENGTH (dsn) + 1);
stripped_name = targetm.strip_name_encoding (name);
if (DECL_ONE_ONLY (decl) && HAVE_COMDAT_GROUP)
{
size_t len = strlen (name) + 3;
- char* rname = alloca (len);
+ char* rname = (char *) alloca (len);
strcpy (rname, ".rodata");
strcat (rname, name + 5);
&& strncmp (name, ".gnu.linkonce.t.", 16) == 0)
{
size_t len = strlen (name) + 1;
- char *rname = alloca (len);
+ char *rname = (char *) alloca (len);
memcpy (rname, name, len);
rname[14] = 'r';
&& strncmp (name, ".text.", 6) == 0)
{
size_t len = strlen (name) + 1;
- char *rname = alloca (len + 2);
+ char *rname = (char *) alloca (len + 2);
memcpy (rname, ".rodata", 7);
memcpy (rname + 7, name + 5, len - 5);
void
set_user_assembler_name (tree decl, const char *name)
{
- char *starred = alloca (strlen (name) + 2);
+ char *starred = (char *) alloca (strlen (name) + 2);
starred[0] = '*';
strcpy (starred + 1, name);
change_decl_assembler_name (decl, get_identifier (starred));
static int
const_desc_eq (const void *p1, const void *p2)
{
- const struct constant_descriptor_tree *c1 = p1;
- const struct constant_descriptor_tree *c2 = p2;
+ const struct constant_descriptor_tree *const c1
+ = (const struct constant_descriptor_tree *) p1;
+ const struct constant_descriptor_tree *const c2
+ = (const struct constant_descriptor_tree *) p2;
if (c1->hash != c2->hash)
return 0;
return compare_constant (c1->value, c2->value);
int labelno;
struct constant_descriptor_tree *desc;
- desc = ggc_alloc (sizeof (*desc));
+ desc = GGC_NEW (struct constant_descriptor_tree);
desc->value = copy_constant (exp);
/* Propagate marked-ness to copied constant. */
key.hash = const_hash_1 (exp);
loc = htab_find_slot_with_hash (const_desc_htab, &key, key.hash, INSERT);
- desc = *loc;
+ desc = (struct constant_descriptor_tree *) *loc;
if (desc == 0)
{
desc = build_constant_desc (exp);
key.value = exp;
key.hash = const_hash_1 (exp);
- desc = htab_find_with_hash (const_desc_htab, &key, key.hash);
+ desc = (struct constant_descriptor_tree *)
+ htab_find_with_hash (const_desc_htab, &key, key.hash);
return (desc ? desc->rtl : NULL_RTX);
}
static hashval_t
const_desc_rtx_hash (const void *ptr)
{
- const struct constant_descriptor_rtx *desc = ptr;
+ const struct constant_descriptor_rtx *const desc
+ = (const struct constant_descriptor_rtx *) ptr;
return desc->hash;
}
static int
const_desc_rtx_eq (const void *a, const void *b)
{
- const struct constant_descriptor_rtx *x = a;
- const struct constant_descriptor_rtx *y = b;
+ const struct constant_descriptor_rtx *const x
+ = (const struct constant_descriptor_rtx *) a;
+ const struct constant_descriptor_rtx *const y
+ = (const struct constant_descriptor_rtx *) b;
if (x->mode != y->mode)
return 0;
break;
}
- hp = data;
+ hp = (hashval_t *) data;
*hp = *hp * 509 + h;
return 0;
}
{
struct rtx_constant_pool *pool;
- pool = ggc_alloc (sizeof (struct rtx_constant_pool));
+ pool = GGC_NEW (struct rtx_constant_pool);
pool->const_rtx_htab = htab_create_ggc (31, const_desc_rtx_hash,
const_desc_rtx_eq, NULL);
pool->first = NULL;
tmp.mode = mode;
hash = const_rtx_hash (x);
slot = htab_find_slot_with_hash (pool->const_rtx_htab, &tmp, hash, INSERT);
- desc = *slot;
+ desc = (struct constant_descriptor_rtx *) *slot;
/* If the constant was already present, return its memory. */
if (desc)
return copy_rtx (desc->mem);
/* Otherwise, create a new descriptor. */
- desc = ggc_alloc (sizeof (*desc));
+ desc = GGC_NEW (struct constant_descriptor_rtx);
*slot = desc;
/* Align the location counter as required by EXP's data type. */
static int
compute_reloc_for_rtx_1 (rtx *xp, void *data)
{
- int *preloc = data;
+ int *preloc = (int *) data;
rtx x = *xp;
switch (GET_CODE (x))
default_internal_label (FILE *stream, const char *prefix,
unsigned long labelno)
{
- char *const buf = alloca (40 + strlen (prefix));
+ char *const buf = (char *) alloca (40 + strlen (prefix));
ASM_GENERATE_INTERNAL_LABEL (buf, prefix, labelno);
ASM_OUTPUT_INTERNAL_LABEL (stream, buf);
}
desc->allocated += data_size + VARRAY_HDR_SIZE;
#endif
if (element[element_kind].uses_ggc)
- ptr = ggc_alloc_cleared (VARRAY_HDR_SIZE + data_size);
+ ptr = GGC_CNEWVAR (struct varray_head_tag, VARRAY_HDR_SIZE + data_size);
else
- ptr = xcalloc (VARRAY_HDR_SIZE + data_size, 1);
+ ptr = XCNEWVAR (struct varray_head_tag, VARRAY_HDR_SIZE + data_size);
ptr->num_elements = num_elements;
ptr->elements_used = 0;
if (element[va->type].uses_ggc)
- va = ggc_realloc (va, VARRAY_HDR_SIZE + data_size);
+ va = GGC_RESIZEVAR (struct varray_head_tag, va,
+ VARRAY_HDR_SIZE + data_size);
else
- va = xrealloc (va, VARRAY_HDR_SIZE + data_size);
+ va = XRESIZEVAR (struct varray_head_tag, va,
+ VARRAY_HDR_SIZE + data_size);
va->num_elements = n;
if (n > old_elements)
memset (&va->data.vdt_c[old_data_size], 0, data_size - old_data_size);
vec_gc_o_reserve_1 (void *vec, int reserve, size_t vec_offset, size_t elt_size,
bool exact MEM_STAT_DECL)
{
- struct vec_prefix *pfx = vec;
+ struct vec_prefix *pfx = (struct vec_prefix *) vec;
unsigned alloc = alloc = calculate_allocation (pfx, reserve, exact);
if (!alloc)
vec_heap_o_reserve_1 (void *vec, int reserve, size_t vec_offset,
size_t elt_size, bool exact MEM_STAT_DECL)
{
- struct vec_prefix *pfx = vec;
+ struct vec_prefix *pfx = (struct vec_prefix *) vec;
unsigned alloc = calculate_allocation (pfx, reserve, exact);
if (!alloc)