aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2013-01-24 10:13:46 -0500
committerDiego Novillo <dnovillo@gcc.gnu.org>2013-01-24 10:13:46 -0500
commitcd030c079e5e42fe3f49261fe01f384e6b7f0111 (patch)
tree34d4eb3cfee54bbc5c75bfb073ac74fea18fdc6d /gcc/tree.c
parenta861ffa4f3272dd7b87e68d5e2a5876cde3f63c3 (diff)
downloadgcc-cd030c079e5e42fe3f49261fe01f384e6b7f0111.zip
gcc-cd030c079e5e42fe3f49261fe01f384e6b7f0111.tar.gz
gcc-cd030c079e5e42fe3f49261fe01f384e6b7f0111.tar.bz2
Remove zone allocator.
This patch removes the GC zone allocator. It is not used and it produces several regressions in the testsuite. Furthermore, it complicates things for the plan to implement manual GC markers (http://gcc.gnu.org/wiki/cxx-conversion/gc-alternatives#Do_GC_marking_manually). Tested on x86_64 with standard checking, --enable-checking=gc and --enable-checking=release. From-SVN: r195426
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 25efd7f..98ad5d8 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -857,9 +857,7 @@ make_node_stat (enum tree_code code MEM_STAT_DECL)
record_node_allocation_statistics (code, length);
- t = ggc_alloc_zone_cleared_tree_node_stat (
- (code == IDENTIFIER_NODE) ? &tree_id_zone : &tree_zone,
- length PASS_MEM_STAT);
+ t = ggc_alloc_cleared_tree_node_stat (length PASS_MEM_STAT);
TREE_SET_CODE (t, code);
switch (type)
@@ -953,7 +951,7 @@ copy_node_stat (tree node MEM_STAT_DECL)
length = tree_size (node);
record_node_allocation_statistics (code, length);
- t = ggc_alloc_zone_tree_node_stat (&tree_zone, length PASS_MEM_STAT);
+ t = ggc_alloc_tree_node_stat (length PASS_MEM_STAT);
memcpy (t, node, length);
if (CODE_CONTAINS_STRUCT (code, TS_COMMON))
@@ -1311,7 +1309,7 @@ make_vector_stat (unsigned len MEM_STAT_DECL)
record_node_allocation_statistics (VECTOR_CST, length);
- t = ggc_alloc_zone_cleared_tree_node_stat (&tree_zone, length PASS_MEM_STAT);
+ t = ggc_alloc_cleared_tree_node_stat (length PASS_MEM_STAT);
TREE_SET_CODE (t, VECTOR_CST);
TREE_CONSTANT (t) = 1;
@@ -1674,7 +1672,7 @@ make_tree_binfo_stat (unsigned base_binfos MEM_STAT_DECL)
record_node_allocation_statistics (TREE_BINFO, length);
- t = ggc_alloc_zone_tree_node_stat (&tree_zone, length PASS_MEM_STAT);
+ t = ggc_alloc_tree_node_stat (length PASS_MEM_STAT);
memset (t, 0, offsetof (struct tree_binfo, base_binfos));
@@ -1713,7 +1711,7 @@ make_tree_vec_stat (int len MEM_STAT_DECL)
record_node_allocation_statistics (TREE_VEC, length);
- t = ggc_alloc_zone_cleared_tree_node_stat (&tree_zone, length PASS_MEM_STAT);
+ t = ggc_alloc_cleared_tree_node_stat (length PASS_MEM_STAT);
TREE_SET_CODE (t, TREE_VEC);
TREE_VEC_LENGTH (t) = len;
@@ -2330,8 +2328,7 @@ tree_cons_stat (tree purpose, tree value, tree chain MEM_STAT_DECL)
{
tree node;
- node = ggc_alloc_zone_tree_node_stat (&tree_zone, sizeof (struct tree_list)
- PASS_MEM_STAT);
+ node = ggc_alloc_tree_node_stat (sizeof (struct tree_list) PASS_MEM_STAT);
memset (node, 0, sizeof (struct tree_common));
record_node_allocation_statistics (TREE_LIST, sizeof (struct tree_list));
@@ -3800,7 +3797,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_tree_node_stat (&tree_zone, length PASS_MEM_STAT);
+ t = ggc_alloc_tree_node_stat (length PASS_MEM_STAT);
memset (t, 0, sizeof (struct tree_common));
@@ -10073,7 +10070,7 @@ build_vl_exp_stat (enum tree_code code, int len MEM_STAT_DECL)
record_node_allocation_statistics (code, length);
- t = ggc_alloc_zone_cleared_tree_node_stat (&tree_zone, length PASS_MEM_STAT);
+ t = ggc_alloc_cleared_tree_node_stat (length PASS_MEM_STAT);
TREE_SET_CODE (t, code);