From 08cee789cdb1b64a6e07a0745489b26f6ddd0720 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Sun, 13 Mar 2005 18:09:55 +0000 Subject: ggc-zone.c: Rewritten. * ggc-zone.c: Rewritten. * alloc-pool.c (dump_alloc_pool_statistics): Don't print statistics if there are none. * configure.ac: Define GGC_ZONE for --with-gc=zone. * config.in: Regenerated. * configure: Regenerated. * gentype.c (write_types_process_field, write_func_for_structure): Pass new argument to gt_pch_note_object. * ggc-common.c (struct ptr_data): Add TYPE. (gt_pch_note_object): Take TYPE argument and save it. (call_count): Update call to ggc_pch_count_object. (call_alloc): Update call to ggc_pch_alloc_object. (gt_pch_save): Call ggc_pch_prepare_write after paddng the PCH file. * ggc-none.c (rtl_zone, garbage_zone, ggc_alloc_zone_stat): Delete. * ggc-page.c (rtl_zone, tree_zone, garbage_zone) (ggc_alloc_zone_stat): Delete. (ggc_pch_count_object, ggc_pch_alloc_object): Add TYPE argument. * ggc.h (gt_pch_note_object, ggc_pch_count_object) (ggc_pch_alloc_object): Update prototypes. (garbage_zone): Delete. (tree_zone, rtl_zone, ggc_alloc_zone_stat, ggc_alloc_zone): Move to GGC_ZONE conditional. Update. Change tree_zone and rtl_zone into pointers. (tree_id_zone): New variable. (ggc_alloc_cleared_zone): Remove unused. (ggc_alloc_zone): Define. (ggc_alloc_rtvec, ggc_alloc_tree): Update to use ggc_alloc_zone. * rtl.c (rtx_alloc_stat, shallow_copy_rtx_stat): Use ggc_alloc_zone_stat. * stringpool.c (gt_pch_n_S): Update call to gt_pch_note_object. * tree.c (copy_node_stat, make_tree_binfo_stat, make_tree_vec_stat) (tree_cons_stat, build1_stat): Update call to ggc_alloc_zone_stat. (make_node_stat): Likewise. Use tree_id_zone. From-SVN: r96381 --- gcc/rtl.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'gcc/rtl.c') diff --git a/gcc/rtl.c b/gcc/rtl.c index e6e4ac1..3cd5bca 100644 --- a/gcc/rtl.c +++ b/gcc/rtl.c @@ -174,8 +174,7 @@ rtx_alloc_stat (RTX_CODE code MEM_STAT_DECL) { rtx rt; - rt = (rtx) ggc_alloc_typed_stat (gt_ggc_e_7rtx_def, - RTX_SIZE (code) PASS_MEM_STAT); + rt = (rtx) ggc_alloc_zone_stat (RTX_SIZE (code), &rtl_zone PASS_MEM_STAT); /* We want to clear everything up to the FLD array. Normally, this is one int, but we don't want to assume that and it isn't very @@ -309,8 +308,8 @@ shallow_copy_rtx_stat (rtx orig MEM_STAT_DECL) { rtx copy; - copy = (rtx) ggc_alloc_typed_stat (gt_ggc_e_7rtx_def, - RTX_SIZE (GET_CODE (orig)) PASS_MEM_STAT); + copy = (rtx) ggc_alloc_zone_stat (RTX_SIZE (GET_CODE (orig)), + &rtl_zone PASS_MEM_STAT); memcpy (copy, orig, RTX_SIZE (GET_CODE (orig))); return copy; } -- cgit v1.1