aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2004-03-03 12:25:51 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2004-03-03 11:25:51 +0000
commitb9dcdee46edefdb67cbbb5aa0829fba999c2a1f0 (patch)
tree2b3885b2b287da398b70600d8381767cc76aa181 /gcc/tree.h
parent6ba7b54780fd483f81c39e0ac07537cbe40063df (diff)
downloadgcc-b9dcdee46edefdb67cbbb5aa0829fba999c2a1f0.zip
gcc-b9dcdee46edefdb67cbbb5aa0829fba999c2a1f0.tar.gz
gcc-b9dcdee46edefdb67cbbb5aa0829fba999c2a1f0.tar.bz2
ggc-common.c (ggc_alloc_cleared_stat, [...]): Rename from ...; make statistics transparent.
* ggc-common.c (ggc_alloc_cleared_stat, ggc_realloc_stat): Rename from ...; make statistics transparent. (ggc_alloc_cleared, ggc_realloc_stat): ... these. (loc_descriptor): New structure. (hash_descriptor, eq_descriptor, loc_descriptor, cmp_statistics, add_statistics): New static function. (ggc_record_overhead, dump_statistics): New global function. * ggc-none.c (ggc_alloc_types_stat, ggc_alloc_stat, ggc_alloc_zone_stat, ggc_alloc_cleared_stat, ggc_realloc_stat, ggc_alloc_typed_stat): Rename from ...; accept locations (ggc_alloc_types, ggc_alloc, ggc_alloc_zone, ggc_alloc_cleared, ggc_realloc, ggc_alloc_typed): ... this one. from ...; accept locations * ggc-page.c (ggc_alloc_typed_stat, ggc_alloc_zone_stat, ggc_alloc_stat): Rename from ... ; pass locations * ggc-page.c (ggc_alloc_typed, ggc_alloc_zone, ggc_alloc): ... this one. (ggc_alloc_stat): Record overehead. * ggc.h (ggc_alloc_types, ggc_alloc, ggc_alloc_zone, ggc_alloc_cleared, ggc_realloc, ggc_alloc_typed): Turn to macros (ggc_alloc_types_stat, ggc_alloc_stat, ggc_alloc_zone_stat, ggc_alloc_cleared_stat, ggc_realloc_stat, ggc_alloc_typed_stat): Declare. (dump_ggc_loc_satistics, ggc_record_overehead): Declare. * langhooks.h (lhd_make_node): Declare. (LANG_HOOKS_MAKE_TYPE): Default to new function, * langhooks.c (lhd_make_node): New. * rtl.c (rtx_alloc_stat, swallow_copy_rtx_stat): Rename from ... ; pass locations. (rtx_alloc, swallow_copy_rtx): ... this one. * rtl.h (rtx_alloc, swallow_copy_rtx): Turn to macros. * rtl.c (rtx_alloc_stat, swallow_copy_rtx_stat): Declare. * toplpev.c (finalize): Dump stats. * tree.c (make_node_stat, copy_node_stat, make_tree_vec_stat, build_tree_list_stat, tree_cons_stat, build?_stat, build_decl_stat): Rename from ... ; pass locators. (make_node, copy_node, make_tree_vec, build_tree_list, tree_cons, build?, build_decl): Declare. * tree.h (make_node_stat, copy_node_stat, make_tree_vec_stat, build_tree_list_stat, tree_cons_stat, build?_stat, build_decl_stat): Declare. (make_node, copy_node, make_tree_vec, build_tree_list, tree_cons, build?, build_decl): New macros. * Makefile.in (RTL_H, TREE_H): Add statistics.h dependency. * statistics.h: New file. From-SVN: r78826
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h35
1 files changed, 24 insertions, 11 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 2fe847e..2d14d89 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -25,6 +25,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "machmode.h"
#include "version.h"
#include "input.h"
+#include "statistics.h"
/* Codes of tree nodes */
@@ -2066,11 +2067,13 @@ extern size_t tree_size (tree);
The TREE_CODE is the only argument. Contents are initialized
to zero except for a few of the common fields. */
-extern tree make_node (enum tree_code);
+extern tree make_node_stat (enum tree_code MEM_STAT_DECL);
+#define make_node(t) make_node_stat (t MEM_STAT_INFO)
/* Make a copy of a node, with all the same contents. */
-extern tree copy_node (tree);
+extern tree copy_node_stat (tree MEM_STAT_DECL);
+#define copy_node(t) copy_node_stat (t MEM_STAT_INFO)
/* Make a copy of a chain of TREE_LIST nodes. */
@@ -2078,7 +2081,8 @@ extern tree copy_list (tree);
/* Make a TREE_VEC. */
-extern tree make_tree_vec (int);
+extern tree make_tree_vec_stat (int MEM_STAT_DECL);
+#define make_tree_vec(t) make_tree_vec_stat (t MEM_STAT_INFO)
/* Return the (unique) IDENTIFIER_NODE node for a given name.
The name is supplied as a char *. */
@@ -2124,11 +2128,17 @@ extern tree build_nt (enum tree_code, ...);
#define _buildC2(x,a1,a2,a3,a4,a5,a6,a7,a8,a9,c,...) c
#endif
-extern tree build0 (enum tree_code, tree);
-extern tree build1 (enum tree_code, tree, tree);
-extern tree build2 (enum tree_code, tree, tree, tree);
-extern tree build3 (enum tree_code, tree, tree, tree, tree);
-extern tree build4 (enum tree_code, tree, tree, tree, tree, tree);
+extern tree build0_stat (enum tree_code, tree MEM_STAT_DECL);
+#define build0(c,t) build0_stat (c,t MEM_STAT_INFO)
+extern tree build1_stat (enum tree_code, tree, tree MEM_STAT_DECL);
+#define build1(c,t1,t2) build1_stat (c,t1,t2 MEM_STAT_INFO)
+extern tree build2_stat (enum tree_code, tree, tree, tree MEM_STAT_DECL);
+#define build2(c,t1,t2,t3) build2_stat (c,t1,t2,t3 MEM_STAT_INFO)
+extern tree build3_stat (enum tree_code, tree, tree, tree, tree MEM_STAT_DECL);
+#define build3(c,t1,t2,t3,t4) build3_stat (c,t1,t2,t3,t4 MEM_STAT_INFO)
+extern tree build4_stat (enum tree_code, tree, tree, tree, tree,
+ tree MEM_STAT_DECL);
+#define build4(c,t1,t2,t3,t4,t5) build4_stat (c,t1,t2,t3,t4,t5 MEM_STAT_INFO)
extern tree build_int_2_wide (unsigned HOST_WIDE_INT, HOST_WIDE_INT);
extern tree build_vector (tree, tree);
@@ -2136,8 +2146,10 @@ extern tree build_constructor (tree, tree);
extern tree build_real_from_int_cst (tree, tree);
extern tree build_complex (tree, tree, tree);
extern tree build_string (int, const char *);
-extern tree build_tree_list (tree, tree);
-extern tree build_decl (enum tree_code, tree, tree);
+extern tree build_tree_list_stat (tree, tree MEM_STAT_DECL);
+#define build_tree_list(t,q) build_tree_list_stat(t,q MEM_STAT_INFO)
+extern tree build_decl_stat (enum tree_code, tree, tree MEM_STAT_DECL);
+#define build_decl(c,t,q) build_decl_stat (c,t,q MEM_STAT_INFO)
extern tree build_block (tree, tree, tree, tree, tree);
extern tree build_expr_wfl (tree, const char *, int, int);
@@ -2495,7 +2507,8 @@ extern tree chainon (tree, tree);
/* Make a new TREE_LIST node from specified PURPOSE, VALUE and CHAIN. */
-extern tree tree_cons (tree, tree, tree);
+extern tree tree_cons_stat (tree, tree, tree MEM_STAT_DECL);
+#define tree_cons(t,q,w) tree_cons_stat (t,q,w MEM_STAT_INFO)
/* Return the last tree node in a chain. */