From: Daniel Jacobowitz Date: Mon, 2 May 2005 18:25:23 +0000 (+0000) Subject: ggc.h (ggc_alloc_zone_pass_stat): New macro. X-Git-Tag: misc/cutover-cvs2svn~3540 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a6e4d85b506e3424a02c752661b47e35efe1ee05;p=thirdparty%2Fgcc.git ggc.h (ggc_alloc_zone_pass_stat): New macro. * ggc.h (ggc_alloc_zone_pass_stat): New macro. (ggc_alloc_zone_stat): Don't define. * ggc-zone.c (ggc_alloc_typed_stat, ggc_alloc_stat): Use ggc_alloc_zone_pass_stat. * rtl.c (rtx_alloc_stat, shallow_copy_rtx_stat): Likewise. * tree.c (make_node_stat, copy_node_stat, make_tree_binfo_stat) (make_tree_vec_stat, tree_cons_stat, build1_stat): Likewise. From-SVN: r99114 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5090358cc091..3d0b8c2bace8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2005-05-02 Daniel Jacobowitz + + * ggc.h (ggc_alloc_zone_pass_stat): New macro. + (ggc_alloc_zone_stat): Don't define. + * ggc-zone.c (ggc_alloc_typed_stat, ggc_alloc_stat): Use + ggc_alloc_zone_pass_stat. + * rtl.c (rtx_alloc_stat, shallow_copy_rtx_stat): Likewise. + * tree.c (make_node_stat, copy_node_stat, make_tree_binfo_stat) + (make_tree_vec_stat, tree_cons_stat, build1_stat): Likewise. + 2005-05-02 Daniel Jacobowitz * calls.c (expand_call): Handle current_function_pretend_args_size diff --git a/gcc/ggc-zone.c b/gcc/ggc-zone.c index 8cc94e0b9e4c..596bbbab7f4a 100644 --- a/gcc/ggc-zone.c +++ b/gcc/ggc-zone.c @@ -1274,16 +1274,16 @@ ggc_alloc_typed_stat (enum gt_types_enum gte, size_t size switch (gte) { case gt_ggc_e_14lang_tree_node: - return ggc_alloc_zone_stat (size, &tree_zone PASS_MEM_STAT); + return ggc_alloc_zone_pass_stat (size, &tree_zone); case gt_ggc_e_7rtx_def: - return ggc_alloc_zone_stat (size, &rtl_zone PASS_MEM_STAT); + return ggc_alloc_zone_pass_stat (size, &rtl_zone); case gt_ggc_e_9rtvec_def: - return ggc_alloc_zone_stat (size, &rtl_zone PASS_MEM_STAT); + return ggc_alloc_zone_pass_stat (size, &rtl_zone); default: - return ggc_alloc_zone_stat (size, &main_zone PASS_MEM_STAT); + return ggc_alloc_zone_pass_stat (size, &main_zone); } } @@ -1292,7 +1292,7 @@ ggc_alloc_typed_stat (enum gt_types_enum gte, size_t size void * ggc_alloc_stat (size_t size MEM_STAT_DECL) { - return ggc_alloc_zone_stat (size, &main_zone PASS_MEM_STAT); + return ggc_alloc_zone_pass_stat (size, &main_zone); } /* Poison the chunk. */ diff --git a/gcc/ggc.h b/gcc/ggc.h index f6fad495b15d..57107ffdfc10 100644 --- a/gcc/ggc.h +++ b/gcc/ggc.h @@ -313,15 +313,11 @@ extern struct alloc_zone tree_id_zone; /* Allocate an object into the specified allocation zone. */ extern void *ggc_alloc_zone_stat (size_t, struct alloc_zone * MEM_STAT_DECL); # define ggc_alloc_zone(s,z) ggc_alloc_zone_stat (s,z MEM_STAT_INFO) - +# define ggc_alloc_zone_pass_stat(s,z) ggc_alloc_zone_stat (s,z PASS_MEM_STAT) #else # define ggc_alloc_zone(s, z) ggc_alloc (s) -# ifdef GATHER_STATISTICS -# define ggc_alloc_zone_stat(s, z, n, l, f) ggc_alloc_stat (s, n, l, f) -# else -# define ggc_alloc_zone_stat(s, z) ggc_alloc_stat (s) -# endif +# define ggc_alloc_zone_pass_stat(s, z) ggc_alloc_stat (s PASS_MEM_STAT) #endif diff --git a/gcc/rtl.c b/gcc/rtl.c index 3cd5bca0f558..2f52544ee0c7 100644 --- a/gcc/rtl.c +++ b/gcc/rtl.c @@ -174,7 +174,7 @@ rtx_alloc_stat (RTX_CODE code MEM_STAT_DECL) { rtx rt; - rt = (rtx) ggc_alloc_zone_stat (RTX_SIZE (code), &rtl_zone PASS_MEM_STAT); + rt = (rtx) ggc_alloc_zone_pass_stat (RTX_SIZE (code), &rtl_zone); /* 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 @@ -308,8 +308,8 @@ shallow_copy_rtx_stat (rtx orig MEM_STAT_DECL) { rtx copy; - copy = (rtx) ggc_alloc_zone_stat (RTX_SIZE (GET_CODE (orig)), - &rtl_zone PASS_MEM_STAT); + copy = (rtx) ggc_alloc_zone_pass_stat (RTX_SIZE (GET_CODE (orig)), + &rtl_zone); memcpy (copy, orig, RTX_SIZE (GET_CODE (orig))); return copy; } diff --git a/gcc/tree.c b/gcc/tree.c index 48efe09ccdda..ed46248be19f 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -347,9 +347,9 @@ make_node_stat (enum tree_code code MEM_STAT_DECL) #endif if (code == IDENTIFIER_NODE) - t = ggc_alloc_zone_stat (length, &tree_id_zone PASS_MEM_STAT); + t = ggc_alloc_zone_pass_stat (length, &tree_id_zone); else - t = ggc_alloc_zone_stat (length, &tree_zone PASS_MEM_STAT); + t = ggc_alloc_zone_pass_stat (length, &tree_zone); memset (t, 0, length); @@ -433,7 +433,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_pass_stat (length, &tree_zone); memcpy (t, node, length); TREE_CHAIN (t) = 0; @@ -921,7 +921,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_pass_stat (length, &tree_zone); memset (t, 0, offsetof (struct tree_binfo, base_binfos)); @@ -946,7 +946,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_pass_stat (length, &tree_zone); memset (t, 0, length); @@ -1418,8 +1418,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); + node = ggc_alloc_zone_pass_stat (sizeof (struct tree_list), &tree_zone); memset (node, 0, sizeof (struct tree_common)); @@ -2512,7 +2511,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_pass_stat (length, &tree_zone); memset (t, 0, sizeof (struct tree_common));