diff options
author | Daniel Jacobowitz <dan@codesourcery.com> | 2005-03-13 18:09:55 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@gcc.gnu.org> | 2005-03-13 18:09:55 +0000 |
commit | 08cee789cdb1b64a6e07a0745489b26f6ddd0720 (patch) | |
tree | e850ce1ca545eaad896454198fdeff35370ff00f /gcc/tree.c | |
parent | 69229b8198e11bbbc5962d3e4ce8ce77ebf737b7 (diff) | |
download | gcc-08cee789cdb1b64a6e07a0745489b26f6ddd0720.zip gcc-08cee789cdb1b64a6e07a0745489b26f6ddd0720.tar.gz gcc-08cee789cdb1b64a6e07a0745489b26f6ddd0720.tar.bz2 |
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
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -341,7 +341,10 @@ make_node_stat (enum tree_code code MEM_STAT_DECL) tree_node_sizes[(int) kind] += length; #endif - t = ggc_alloc_zone_stat (length, tree_zone PASS_MEM_STAT); + if (code == IDENTIFIER_NODE) + t = ggc_alloc_zone_stat (length, &tree_id_zone PASS_MEM_STAT); + else + t = ggc_alloc_zone_stat (length, &tree_zone PASS_MEM_STAT); memset (t, 0, length); @@ -425,7 +428,7 @@ copy_node_stat (tree node MEM_STAT_DECL) gcc_assert (code != STATEMENT_LIST); length = tree_size (node); - t = ggc_alloc_zone_stat (length, tree_zone PASS_MEM_STAT); + t = ggc_alloc_zone_stat (length, &tree_zone PASS_MEM_STAT); memcpy (t, node, length); TREE_CHAIN (t) = 0; @@ -910,7 +913,7 @@ make_tree_binfo_stat (unsigned base_binfos MEM_STAT_DECL) tree_node_sizes[(int) binfo_kind] += length; #endif - t = ggc_alloc_zone_stat (length, tree_zone PASS_MEM_STAT); + t = ggc_alloc_zone_stat (length, &tree_zone PASS_MEM_STAT); memset (t, 0, offsetof (struct tree_binfo, base_binfos)); @@ -935,7 +938,7 @@ make_tree_vec_stat (int len MEM_STAT_DECL) tree_node_sizes[(int) vec_kind] += length; #endif - t = ggc_alloc_zone_stat (length, tree_zone PASS_MEM_STAT); + t = ggc_alloc_zone_stat (length, &tree_zone PASS_MEM_STAT); memset (t, 0, length); @@ -1408,7 +1411,7 @@ tree_cons_stat (tree purpose, tree value, tree chain MEM_STAT_DECL) tree node; node = ggc_alloc_zone_stat (sizeof (struct tree_list), - tree_zone PASS_MEM_STAT); + &tree_zone PASS_MEM_STAT); memset (node, 0, sizeof (struct tree_common)); @@ -2502,7 +2505,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_stat (length, tree_zone PASS_MEM_STAT); + t = ggc_alloc_zone_stat (length, &tree_zone PASS_MEM_STAT); memset (t, 0, sizeof (struct tree_common)); |