Commit a6e4d85b by Daniel Jacobowitz Committed by Daniel Jacobowitz

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
parent ff7f012a
2005-05-02 Daniel Jacobowitz <dan@codesourcery.com> 2005-05-02 Daniel Jacobowitz <dan@codesourcery.com>
* 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 <dan@codesourcery.com>
* calls.c (expand_call): Handle current_function_pretend_args_size * calls.c (expand_call): Handle current_function_pretend_args_size
when checking for sibcalls. when checking for sibcalls.
......
...@@ -1274,16 +1274,16 @@ ggc_alloc_typed_stat (enum gt_types_enum gte, size_t size ...@@ -1274,16 +1274,16 @@ ggc_alloc_typed_stat (enum gt_types_enum gte, size_t size
switch (gte) switch (gte)
{ {
case gt_ggc_e_14lang_tree_node: 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: 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: 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: 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 ...@@ -1292,7 +1292,7 @@ ggc_alloc_typed_stat (enum gt_types_enum gte, size_t size
void * void *
ggc_alloc_stat (size_t size MEM_STAT_DECL) 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. */ /* Poison the chunk. */
......
...@@ -313,15 +313,11 @@ extern struct alloc_zone tree_id_zone; ...@@ -313,15 +313,11 @@ extern struct alloc_zone tree_id_zone;
/* Allocate an object into the specified allocation zone. */ /* Allocate an object into the specified allocation zone. */
extern void *ggc_alloc_zone_stat (size_t, struct alloc_zone * MEM_STAT_DECL); 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(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 #else
# define ggc_alloc_zone(s, z) ggc_alloc (s) # define ggc_alloc_zone(s, z) ggc_alloc (s)
# ifdef GATHER_STATISTICS # define ggc_alloc_zone_pass_stat(s, z) ggc_alloc_stat (s PASS_MEM_STAT)
# 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
#endif #endif
......
...@@ -174,7 +174,7 @@ rtx_alloc_stat (RTX_CODE code MEM_STAT_DECL) ...@@ -174,7 +174,7 @@ rtx_alloc_stat (RTX_CODE code MEM_STAT_DECL)
{ {
rtx rt; 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 /* 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 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) ...@@ -308,8 +308,8 @@ shallow_copy_rtx_stat (rtx orig MEM_STAT_DECL)
{ {
rtx copy; rtx copy;
copy = (rtx) ggc_alloc_zone_stat (RTX_SIZE (GET_CODE (orig)), copy = (rtx) ggc_alloc_zone_pass_stat (RTX_SIZE (GET_CODE (orig)),
&rtl_zone PASS_MEM_STAT); &rtl_zone);
memcpy (copy, orig, RTX_SIZE (GET_CODE (orig))); memcpy (copy, orig, RTX_SIZE (GET_CODE (orig)));
return copy; return copy;
} }
......
...@@ -347,9 +347,9 @@ make_node_stat (enum tree_code code MEM_STAT_DECL) ...@@ -347,9 +347,9 @@ make_node_stat (enum tree_code code MEM_STAT_DECL)
#endif #endif
if (code == IDENTIFIER_NODE) 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 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); memset (t, 0, length);
...@@ -433,7 +433,7 @@ copy_node_stat (tree node MEM_STAT_DECL) ...@@ -433,7 +433,7 @@ copy_node_stat (tree node MEM_STAT_DECL)
gcc_assert (code != STATEMENT_LIST); gcc_assert (code != STATEMENT_LIST);
length = tree_size (node); 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); memcpy (t, node, length);
TREE_CHAIN (t) = 0; TREE_CHAIN (t) = 0;
...@@ -921,7 +921,7 @@ make_tree_binfo_stat (unsigned base_binfos MEM_STAT_DECL) ...@@ -921,7 +921,7 @@ make_tree_binfo_stat (unsigned base_binfos MEM_STAT_DECL)
tree_node_sizes[(int) binfo_kind] += length; tree_node_sizes[(int) binfo_kind] += length;
#endif #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)); memset (t, 0, offsetof (struct tree_binfo, base_binfos));
...@@ -946,7 +946,7 @@ make_tree_vec_stat (int len MEM_STAT_DECL) ...@@ -946,7 +946,7 @@ make_tree_vec_stat (int len MEM_STAT_DECL)
tree_node_sizes[(int) vec_kind] += length; tree_node_sizes[(int) vec_kind] += length;
#endif #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); memset (t, 0, length);
...@@ -1418,8 +1418,7 @@ tree_cons_stat (tree purpose, tree value, tree chain MEM_STAT_DECL) ...@@ -1418,8 +1418,7 @@ tree_cons_stat (tree purpose, tree value, tree chain MEM_STAT_DECL)
{ {
tree node; tree node;
node = ggc_alloc_zone_stat (sizeof (struct tree_list), node = ggc_alloc_zone_pass_stat (sizeof (struct tree_list), &tree_zone);
&tree_zone PASS_MEM_STAT);
memset (node, 0, sizeof (struct tree_common)); memset (node, 0, sizeof (struct tree_common));
...@@ -2512,7 +2511,7 @@ build1_stat (enum tree_code code, tree type, tree node MEM_STAT_DECL) ...@@ -2512,7 +2511,7 @@ build1_stat (enum tree_code code, tree type, tree node MEM_STAT_DECL)
gcc_assert (TREE_CODE_LENGTH (code) == 1); 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)); memset (t, 0, sizeof (struct tree_common));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment