diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2008-06-20 18:34:07 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2008-06-20 18:34:07 +0000 |
commit | 3d9a9f947fd29c85f7ed17f1b92000bff510de20 (patch) | |
tree | 679f2f8dd5627c5293b9fec2a4c2fc13e5a73c6a /gcc/tree.c | |
parent | 952137502b559919c0cf1c6087ac7d4f3ba3a32c (diff) | |
download | gcc-3d9a9f947fd29c85f7ed17f1b92000bff510de20.zip gcc-3d9a9f947fd29c85f7ed17f1b92000bff510de20.tar.gz gcc-3d9a9f947fd29c85f7ed17f1b92000bff510de20.tar.bz2 |
ggc.h (GGC_RESIZEVAR): New, reorder macros.
* 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
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 70 |
1 files changed, 38 insertions, 32 deletions
@@ -569,9 +569,9 @@ make_node_stat (enum tree_code code MEM_STAT_DECL) #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); @@ -674,7 +674,7 @@ copy_node_stat (tree node MEM_STAT_DECL) 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)) @@ -928,7 +928,7 @@ build_int_cst_wide (tree type, unsigned HOST_WIDE_INT low, HOST_WIDE_INT hi) 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. */ @@ -1104,7 +1104,7 @@ build_fixed (tree type, FIXED_VALUE_TYPE f) 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; @@ -1125,7 +1125,7 @@ build_real (tree type, REAL_VALUE_TYPE d) 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; @@ -1274,7 +1274,7 @@ make_tree_binfo_stat (unsigned base_binfos MEM_STAT_DECL) 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)); @@ -1299,7 +1299,7 @@ make_tree_vec_stat (int len MEM_STAT_DECL) 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); @@ -1773,7 +1773,7 @@ tree_cons_stat (tree purpose, tree value, tree chain MEM_STAT_DECL) { 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)); @@ -3097,7 +3097,7 @@ build1_stat (enum tree_code code, tree type, tree node MEM_STAT_DECL) 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)); @@ -4275,7 +4275,8 @@ build_variant_type_copy (tree type) 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); } @@ -4313,7 +4314,7 @@ decl_init_priority_lookup (tree decl) 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; } @@ -4327,7 +4328,7 @@ decl_fini_priority_lookup (tree decl) 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; } @@ -4344,7 +4345,7 @@ decl_priority_info (tree decl) 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); @@ -4390,8 +4391,8 @@ decl_restrict_base_lookup (tree from) 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; } @@ -4403,7 +4404,7 @@ decl_restrict_base_insert (tree from, tree to) 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; @@ -4455,7 +4456,8 @@ decl_debug_expr_lookup (tree from) 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; @@ -4469,7 +4471,7 @@ decl_debug_expr_insert (tree from, tree to) 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; @@ -4485,7 +4487,8 @@ decl_value_expr_lookup (tree from) 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; @@ -4499,7 +4502,7 @@ decl_value_expr_insert (tree from, tree to) 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; @@ -4534,7 +4537,8 @@ type_hash_list (const_tree list, hashval_t hashcode) 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 @@ -4653,7 +4657,8 @@ type_hash_lookup (hashval_t hashcode, tree type) 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; @@ -4668,7 +4673,7 @@ type_hash_add (hashval_t hashcode, tree type) 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); @@ -6703,7 +6708,7 @@ get_file_function_name (const char *type) 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); @@ -6713,7 +6718,8 @@ get_file_function_name (const char *type) 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 @@ -6749,7 +6755,7 @@ tree_check_failed (const_tree node, const char *file, 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))) { @@ -6788,7 +6794,7 @@ tree_not_check_failed (const_tree node, const char *file, 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))) { @@ -6837,7 +6843,7 @@ tree_range_check_failed (const_tree node, const char *file, int line, 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) @@ -6898,7 +6904,7 @@ omp_clause_range_check_failed (const_tree node, const char *file, int line, 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) @@ -7720,7 +7726,7 @@ build_omp_clause (enum omp_clause_code code) 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); @@ -7787,7 +7793,7 @@ build_vl_exp_stat (enum tree_code code, int len MEM_STAT_DECL) 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); |