summaryrefslogtreecommitdiff
path: root/gcc/ggc.h
diff options
context:
space:
mode:
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-01-24 15:13:46 +0000
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-01-24 15:13:46 +0000
commit5cc133546a196ebceb71b11c50db41bec240e530 (patch)
tree34d4eb3cfee54bbc5c75bfb073ac74fea18fdc6d /gcc/ggc.h
parent2b5c3dd17b47e65b28ec2abc3aed3869eaa4a37a (diff)
downloadgcc-5cc133546a196ebceb71b11c50db41bec240e530.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195426 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ggc.h')
-rw-r--r--gcc/ggc.h102
1 files changed, 11 insertions, 91 deletions
diff --git a/gcc/ggc.h b/gcc/ggc.h
index 4c424ca639b..b31bc80489f 100644
--- a/gcc/ggc.h
+++ b/gcc/ggc.h
@@ -48,8 +48,7 @@ typedef void (*gt_handle_reorder) (void *, void *, gt_pointer_operator,
void *);
/* Used by the gt_pch_n_* routines. Register an object in the hash table. */
-extern int gt_pch_note_object (void *, void *, gt_note_pointers,
- enum gt_types_enum = gt_types_enum_last);
+extern int gt_pch_note_object (void *, void *, gt_note_pointers);
/* Used by the gt_pch_n_* routines. Register that an object has a reorder
function. */
@@ -118,8 +117,6 @@ extern void gt_ggc_m_S (const void *);
/* End of GTY machinery API. */
-struct alloc_zone;
-
/* Initialize the string pool. */
extern void init_stringpool (void);
@@ -146,12 +143,6 @@ extern size_t ggc_round_alloc_size (size_t requested_size);
#define ggc_internal_alloc(s) ggc_internal_alloc_stat (s MEM_STAT_INFO)
-/* Allocate an object of the specified type and size. */
-extern void *ggc_alloc_typed_stat (enum gt_types_enum, size_t MEM_STAT_DECL)
- ATTRIBUTE_MALLOC;
-
-#define ggc_alloc_typed(s, z) ggc_alloc_typed_stat (s, z MEM_STAT_INFO)
-
/* Allocates cleared memory. */
extern void *ggc_internal_cleared_alloc_stat (size_t MEM_STAT_DECL)
ATTRIBUTE_MALLOC;
@@ -213,7 +204,7 @@ extern void *ggc_cleared_alloc_ptr_array_two_args (size_t, size_t)
splay_tree_new_typed_alloc (COMPARE, NULL, NULL, &ALLOC_TREE, &ALLOC_NODE, \
&ggc_splay_dont_free, NULL)
-extern void *ggc_splay_alloc (enum gt_types_enum, int, void *)
+extern void *ggc_splay_alloc (int, void *)
ATTRIBUTE_MALLOC;
extern void ggc_splay_dont_free (void *, void *);
@@ -254,99 +245,28 @@ extern void stringpool_statistics (void);
/* Heuristics. */
extern void init_ggc_heuristics (void);
-/* Zone collection. */
-
-/* For regular rtl allocations. */
-extern struct alloc_zone rtl_zone;
-
-/* For regular tree allocations. */
-extern struct alloc_zone tree_zone;
-
-/* For IDENTIFIER_NODE allocations. */
-extern struct alloc_zone tree_id_zone;
-
-#define ggc_alloc_rtvec_sized(NELT) \
- ggc_alloc_zone_rtvec_def (sizeof (struct rtvec_def) \
- + ((NELT) - 1) * sizeof (rtx), \
- &rtl_zone)
-
-#if defined (GGC_ZONE) && !defined (GENERATOR_FILE)
-
-/* Allocate an object into the specified allocation zone. */
-extern void *ggc_internal_alloc_zone_stat (size_t,
- struct alloc_zone * MEM_STAT_DECL)
- ATTRIBUTE_MALLOC;
-
-extern void *ggc_internal_cleared_alloc_zone_stat (size_t,
- struct alloc_zone * MEM_STAT_DECL)
- ATTRIBUTE_MALLOC;
-
-static inline void *
-ggc_internal_zone_alloc_stat (struct alloc_zone * z, size_t s MEM_STAT_DECL)
-{
- return ggc_internal_alloc_zone_stat (s, z PASS_MEM_STAT);
-}
-
-static inline void *
-ggc_internal_zone_cleared_alloc_stat (struct alloc_zone * z, size_t s
- MEM_STAT_DECL)
-{
- return ggc_internal_cleared_alloc_zone_stat (s, z PASS_MEM_STAT);
-}
-
-static inline void *
-ggc_internal_zone_vec_alloc_stat (struct alloc_zone * z, size_t s, size_t n
- MEM_STAT_DECL)
-{
- return ggc_internal_alloc_zone_stat (s * n, z PASS_MEM_STAT);
-}
-
-
-#else
-
-static inline void *
-ggc_internal_zone_alloc_stat (struct alloc_zone * z ATTRIBUTE_UNUSED,
- size_t s MEM_STAT_DECL)
-{
- return ggc_internal_alloc_stat (s PASS_MEM_STAT);
-}
-
-static inline void *
-ggc_internal_zone_cleared_alloc_stat (struct alloc_zone * z ATTRIBUTE_UNUSED,
- size_t s MEM_STAT_DECL)
-{
- return ggc_internal_cleared_alloc_stat (s PASS_MEM_STAT);
-}
-
-static inline void *
-ggc_internal_zone_vec_alloc_stat (struct alloc_zone * z ATTRIBUTE_UNUSED,
- size_t s, size_t n MEM_STAT_DECL)
-{
- return ggc_internal_vec_alloc_stat (s, n PASS_MEM_STAT);
-}
-
-#endif
+#define ggc_alloc_rtvec_sized(NELT) \
+ ggc_alloc_rtvec_def (sizeof (struct rtvec_def) \
+ + ((NELT) - 1) * sizeof (rtx)) \
/* Memory statistics passing versions of some allocators. Too few of them to
make gengtype produce them, so just define the needed ones here. */
static inline struct rtx_def *
-ggc_alloc_zone_rtx_def_stat (struct alloc_zone * z, size_t s MEM_STAT_DECL)
+ggc_alloc_rtx_def_stat (size_t s MEM_STAT_DECL)
{
- return (struct rtx_def *) ggc_internal_zone_alloc_stat (z, s PASS_MEM_STAT);
+ return (struct rtx_def *) ggc_internal_alloc_stat (s PASS_MEM_STAT);
}
static inline union tree_node *
-ggc_alloc_zone_tree_node_stat (struct alloc_zone * z, size_t s MEM_STAT_DECL)
+ggc_alloc_tree_node_stat (size_t s MEM_STAT_DECL)
{
- return (union tree_node *) ggc_internal_zone_alloc_stat (z, s PASS_MEM_STAT);
+ return (union tree_node *) ggc_internal_alloc_stat (s PASS_MEM_STAT);
}
static inline union tree_node *
-ggc_alloc_zone_cleared_tree_node_stat (struct alloc_zone * z, size_t s
- MEM_STAT_DECL)
+ggc_alloc_cleared_tree_node_stat (size_t s MEM_STAT_DECL)
{
- return (union tree_node *)
- ggc_internal_zone_cleared_alloc_stat (z, s PASS_MEM_STAT);
+ return (union tree_node *) ggc_internal_cleared_alloc_stat (s PASS_MEM_STAT);
}
static inline union gimple_statement_d *