diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-26 00:18:25 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-26 00:18:25 +0000 |
commit | 4077bf7a09b962c6c89974ff79086f9608552619 (patch) | |
tree | 8bec70e2b9f614f364abd830f6241a61d7d1d986 /gcc/ggc-page.c | |
parent | c006a2ce6e17bd2cc7889e04c22db97d2ba529ca (diff) | |
download | gcc-4077bf7a09b962c6c89974ff79086f9608552619.tar.gz |
* config/i386/driver-i386.c (detect_caches_amd,
detect_caches_intel, host_detect_local_cpu): Fix -Wc++-compat
and/or -Wcast-qual warnings.
*ggc-common.c (ggc_mark_roots, gt_pch_note_object,
gt_pch_note_reorder, relocate_ptrs, write_pch_globals,
gt_pch_save): Likewise.
* ggc-page.c (push_depth, push_by_depth, alloc_anon, alloc_page,
gt_ggc_m_S, clear_marks, ggc_pch_read): Likewise.
* global.c (compute_regsets): Likewise.
* graph.c (print_rtl_graph_with_bb, clean_graph_dump_file,
finish_graph_dump_file): Likewise.
* haifa-sched.c (schedule_block, extend_h_i_d, extend_ready,
unlink_bb_notes): Likewise.
* integrate.c (get_hard_reg_initial_val): Likewise.
* ipa-prop.c (ipa_push_func_to_list): Likewise.
* ipa-struct-reorg.c (gen_var_name, gen_cluster_name): Likewise.
* local-alloc.c (update_equiv_regs): Likewise.
* loop-invariant.c (check_invariant_table_size,
hash_invariant_expr, eq_invariant_expr, find_or_insert_inv):
Likewise.
* loop-iv.c (check_iv_ref_table_size, analyzed_for_bivness_p,
altered_reg_used, mark_altered): Likewise.
* loop-unroll.c (si_info_eq, ve_info_eq, allocate_basic_variable,
insert_var_expansion_initialization,
combine_var_copies_in_loop_exit, apply_opt_in_copies,
release_var_copies): Likewise.
* matrix-reorg.c (mat_acc_phi_hash, mat_acc_phi_eq, mtt_info_eq,
analyze_matrix_decl, add_allocation_site, analyze_transpose,
analyze_accesses_for_phi_node, check_var_notmodified_p,
check_allocation_function, find_sites_in_func,
record_all_accesses_in_func, transform_access_sites,
transform_allocation_sites): Likewise.
* omp-low.c (new_omp_region, create_omp_child_function_name,
check_omp_nesting_restrictions, check_combined_parallel,
lower_omp_2, diagnose_sb_1, diagnose_sb_2): Likewise.
* optabs.c (no_conflict_move_test, gen_libfunc, gen_fp_libfunc,
gen_intv_fp_libfunc, gen_interclass_conv_libfunc,
gen_intraclass_conv_libfunc, set_optab_libfunc, set_conv_libfunc):
Likewise.
* opts-common.c (prune_options): Likewise.
* opts.c (add_input_filename, print_filtered_help,
get_option_state): Likewise.
* params.c (add_params): Likewise.
* passes.c (set_pass_for_id, next_pass_1,
do_per_function_toporder, pass_fini_dump_file): Likewise.
* postreload.c (reload_cse_simplify_operands): Likewise.
* predict.c (tree_predicted_by_p, tree_predict_edge,
clear_bb_predictions, combine_predictions_for_bb): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137134 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ggc-page.c')
-rw-r--r-- | gcc/ggc-page.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c index 416f9114122..14e0776a1a6 100644 --- a/gcc/ggc-page.c +++ b/gcc/ggc-page.c @@ -503,7 +503,7 @@ push_depth (unsigned int i) if (G.depth_in_use >= G.depth_max) { G.depth_max *= 2; - G.depth = xrealloc (G.depth, G.depth_max * sizeof (unsigned int)); + G.depth = XRESIZEVEC (unsigned int, G.depth, G.depth_max); } G.depth[G.depth_in_use++] = i; } @@ -516,10 +516,9 @@ push_by_depth (page_entry *p, unsigned long *s) if (G.by_depth_in_use >= G.by_depth_max) { G.by_depth_max *= 2; - G.by_depth = xrealloc (G.by_depth, - G.by_depth_max * sizeof (page_entry *)); - G.save_in_use = xrealloc (G.save_in_use, - G.by_depth_max * sizeof (unsigned long *)); + G.by_depth = XRESIZEVEC (page_entry *, G.by_depth, G.by_depth_max); + G.save_in_use = XRESIZEVEC (unsigned long *, G.save_in_use, + G.by_depth_max); } G.by_depth[G.by_depth_in_use] = p; G.save_in_use[G.by_depth_in_use++] = s; @@ -657,12 +656,12 @@ static inline char * alloc_anon (char *pref ATTRIBUTE_UNUSED, size_t size) { #ifdef HAVE_MMAP_ANON - char *page = mmap (pref, size, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + char *page = (char *) mmap (pref, size, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); #endif #ifdef HAVE_MMAP_DEV_ZERO - char *page = mmap (pref, size, PROT_READ | PROT_WRITE, - MAP_PRIVATE, G.dev_zero_fd, 0); + char *page = (char *) mmap (pref, size, PROT_READ | PROT_WRITE, + MAP_PRIVATE, G.dev_zero_fd, 0); #endif if (page == (char *) MAP_FAILED) @@ -772,7 +771,7 @@ alloc_page (unsigned order) memory order. */ for (i = GGC_QUIRE_SIZE - 1; i >= 1; i--) { - e = xcalloc (1, page_entry_size); + e = XCNEWVAR (struct page_entry, page_entry_size); e->order = order; e->bytes = G.pagesize; e->page = page + (i << G.lg_pagesize); @@ -857,7 +856,7 @@ alloc_page (unsigned order) #endif if (entry == NULL) - entry = xcalloc (1, page_entry_size); + entry = XCNEWVAR (struct page_entry, page_entry_size); entry->bytes = entry_size; entry->page = page; @@ -1285,7 +1284,7 @@ gt_ggc_m_S (const void *p) a STRING_CST. */ gcc_assert (offset == offsetof (struct tree_string, str)); p = ((const char *) p) - offset; - gt_ggc_mx_lang_tree_node ((void *) p); + gt_ggc_mx_lang_tree_node (CONST_CAST (void *, p)); return; } @@ -1666,7 +1665,7 @@ clear_marks (void) if (p->context_depth < G.context_depth) { if (! save_in_use_p (p)) - save_in_use_p (p) = xmalloc (bitmap_size); + save_in_use_p (p) = XNEWVAR (unsigned long, bitmap_size); memcpy (save_in_use_p (p), p->in_use_p, bitmap_size); } @@ -2272,7 +2271,7 @@ ggc_pch_read (FILE *f, void *addr) { struct ggc_pch_ondisk d; unsigned i; - char *offs = addr; + char *offs = (char *) addr; unsigned long count_old_page_tables; unsigned long count_new_page_tables; @@ -2318,9 +2317,9 @@ ggc_pch_read (FILE *f, void *addr) bytes = ROUND_UP (d.totals[i] * OBJECT_SIZE (i), G.pagesize); num_objs = bytes / OBJECT_SIZE (i); - entry = xcalloc (1, (sizeof (struct page_entry) - - sizeof (long) - + BITMAP_SIZE (num_objs + 1))); + entry = XCNEWVAR (struct page_entry, (sizeof (struct page_entry) + - sizeof (long) + + BITMAP_SIZE (num_objs + 1))); entry->bytes = bytes; entry->page = offs; entry->context_depth = 0; |