diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-09 07:07:41 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-09 07:07:41 +0000 |
commit | 2c8daaf1492b5be85b73fdf3dfd9841fd7569358 (patch) | |
tree | a7da2e093783d85c65b07fb9ce3252698327f53b /gcc/ggc-simple.c | |
parent | b0652a4fd40b566f64e958d207d438e422093bb5 (diff) | |
download | gcc-2c8daaf1492b5be85b73fdf3dfd9841fd7569358.tar.gz |
* combine.c (SUBST): Break out to a real function do_SUBST.
(SUBST_INT): Likewise.
* gcse.c (free_pre_mem): Free `temp_bitmap'.
(pre_insert): Free `inserted'.
* loop.c (basic_induction_var): Always set `location'.
* function.c (expand_function_end): Add initial_trampoline as a root.
* rtl.h (init_varasm_once): Declare.
* toplev.c (compile_file): Call it.
* ggc-simple.c (ggc_mark_string_ptr): New.
(ggc_add_string_root): New.
(ggc_collect): Disable collection avoidance temporarily.
* ggc.h (ggc_add_string_root): Declare.
* except.c (create_rethrow_ref): Use ggc_alloc_string.
* optabs.c (init_libfuncs): Likewise.
* varasm.c (named_section): Use ggc_alloc_string.
(make_function_rtl): Likewise.
(make_decl_rtl): Likewise.
(assemble_static_space): Likewise.
(assemble_trampoline_template): Likewise.
(output_constant_def): Likewise.
(force_const_mem): Likewise.
(mark_const_hash_entry): New.
(mark_pool_sym_hash_table): New.
(mark_varasm_state): Use it.
(init_varasm_once): New.
* expr.h (init_one_libfunc): Declare.
* optabs.c (init_one_libfunc): New.
(init_optabs): Use it.
* config/gofast.h: Likewise.
* config/sparc/sol2.h (INIT_SUBTARGET_OPTABS): Likewise.
* config/sparc/sparc.h (INIT_TARGET_OPTABS): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29226 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ggc-simple.c')
-rw-r--r-- | gcc/ggc-simple.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/gcc/ggc-simple.c b/gcc/ggc-simple.c index 4858934f361..e4064a8140b 100644 --- a/gcc/ggc-simple.c +++ b/gcc/ggc-simple.c @@ -125,6 +125,7 @@ static void ggc_free_rtx PROTO ((struct ggc_rtx *r)); static void ggc_free_tree PROTO ((struct ggc_tree *t)); static void ggc_mark_rtx_ptr PROTO ((void *elt)); static void ggc_mark_tree_ptr PROTO ((void *elt)); +static void ggc_mark_string_ptr PROTO ((void *elt)); static void ggc_mark_tree_varray_ptr PROTO ((void *elt)); static void ggc_mark_tree_hash_table_ptr PROTO ((void *elt)); static boolean ggc_mark_tree_hash_table_entry PROTO ((struct hash_entry *, @@ -691,7 +692,7 @@ ggc_collect () struct ggc_any *a, **ap; int time, n_rtxs, n_trees, n_vecs, n_strings, n_anys; -#ifndef ENABLE_CHECKING +#if 0 /* See if it's even worth our while. */ if (ggc_chain->bytes_alloced_since_gc < 64*1024) return; @@ -883,6 +884,14 @@ ggc_add_tree_root (base, nelt) ggc_add_root (base, nelt, sizeof(tree), ggc_mark_tree_ptr); } +void +ggc_add_string_root (base, nelt) + char **base; + int nelt; +{ + ggc_add_root (base, nelt, sizeof(char *), ggc_mark_string_ptr); +} + /* Add V (a varray full of trees) to the list of GC roots. */ void @@ -943,6 +952,16 @@ ggc_mark_tree_ptr (elt) } /* Type-correct function to pass to ggc_add_root. It just forwards + ELT (which is really a char **) to ggc_mark_string. */ + +static void +ggc_mark_string_ptr (elt) + void *elt; +{ + ggc_mark_string (*(char **)elt); +} + +/* Type-correct function to pass to ggc_add_root. It just forwards ELT (which is really a varray_type *) to ggc_mark_tree_varray. */ static void |