summaryrefslogtreecommitdiff
path: root/gcc/ggc.h
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-07 15:20:58 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-07 15:20:58 +0000
commitc788feb103ab19ea3f47a5f2defa6f6b3006fe1f (patch)
treeebef7e81648f072e4f956a33a801979f7a35c649 /gcc/ggc.h
parent94f18c7e7cd9a47b97c0cf20924aab26f7323ebb (diff)
downloadgcc-c788feb103ab19ea3f47a5f2defa6f6b3006fe1f.tar.gz
* emit-rtl.c (free_emit_status): Take decl as a parameter.
(init_emit_once): Add more GC roots. * except.c (mark_func_eh_entry): New function. (mark_eh_node): Mark false_label and rethrow_label. (init_eh): Add more GC roots. * function.c (free_after_compilation): Take decl as a paramter. Call free_stmt_status. (mark_function_state): Don't assume x_parm_reg_stack_loc is non-NULL. * function.h (free_after_compilation): Change prototype. (free_varasm_status): Likewise. (free_emit_status): Likewise. (free_stmt_status): New function. * ggc-simple.c (rtx, vecs, trees, strings, bytes_alloced_since_gc): Remove, replacing with ... (ggc_status): New structure. (ggc_chain): New variable. (init_gcc): Define. (ggc_push_context): New function. (ggc_pop_context): Likewise. (ggc_alloc_rtx): Adjust for use of ggc_chain. (ggc_alloc_rtvec): Likewise. (ggc_alloc_tree): Likewise. (ggc_alloc_string): Likewise. (ggc_mark_rtx): Mark NOTE_SOURCE_FILE and NOTE_RANGE_INFO. (ggc_mark_tree): Give language-dependent code a chance to mark `x' nodes. (ggc_mark_tree_varray): Handle empty arrays. (ggc_collect): Adjust for use of ggc_chain. Clear bytes_alloced_since_last_gc. * ggc.h (ggc_pop_context): New function. (ggc_push_context): Likewise. * print-tree.c (print_node): Don't print obstacks when GC'ing. * stmt.c (free_stmt_status): New function. (init_stmt_for_function): Clear last_expr_value. * toplev.c (rest_of_compilation): Always call free_after_compilation. Conditionalize call to ggc_collect. (main): Call init_ggc. * tree.c (push_obstacks): Do the push, even when GC'ing. (push_obstacks_nochange): Likewise. (pop_obstacks): Liekwise. * varasm.c (free_varasm_status): Take decl as a parameter. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29170 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ggc.h')
-rw-r--r--gcc/ggc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ggc.h b/gcc/ggc.h
index 5acf3e9c7eb..785e25bf80f 100644
--- a/gcc/ggc.h
+++ b/gcc/ggc.h
@@ -43,6 +43,13 @@ struct hash_table;
extern void init_ggc PROTO ((void));
+/* Start a new GGC context. Memory allocated in previous contexts
+ will not be collected while the new context is active. */
+extern void ggc_pop_context PROTO ((void));
+/* Finish a GC context. Any uncollected memory in the new context
+ will be merged with the old context. */
+extern void ggc_push_context PROTO ((void));
+
/* Allocation. */
struct rtx_def *ggc_alloc_rtx PROTO ((int nslots));