summaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-05 02:41:35 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-05 02:41:35 +0000
commita7b0c1703cd201fa6e07895ead90464198f170eb (patch)
treee5cebe68f9343bcd10b7be75a8d15ab8791ec212 /gcc/varasm.c
parent10f946bf78e0c973a626f1dd04bf275cd3612bf5 (diff)
downloadgcc-a7b0c1703cd201fa6e07895ead90464198f170eb.tar.gz
* Makefile.in (tree.o): Depend on ggc.h.
(varasm.o): Likewise. (function.o): Likewise. (stmt.o): Likewise. (except.o): Likewise. (optabs.o): Likewise. (emit-rtl.o): Likewise. * emit-rtl.c: Include ggc.h. (sequence_element_free_list): Remove, and all references. (mark_sequence): New functions. (mark_emit_state): New function. * except.c: Include ggc.h. (mark_eh_node, mark_eh_stack, mark_eh_queue): New functions. (mark_tree_label_node): New functions. (mark_eh_state): New function. * function.c: Include ggc.h. (mark_temp_slot, mark_function_chain): New functions. (mark_function_state): New function. (init_function_once): New function. * function.h (init_function_once): New function. * ggc-callbacks.c (lang_mark_false_label_stack): New function. * ggc.h (label_node): Declare. (eh_status, emit_status, stmt_status, varasm_status): Likewise. (lang_mark_false_label_stack): New function. (mark_temp_slot): Remove declaration. (mark_function_chain): Likewise. (mark_eh_state): Adjust prototype. (mark_stmt_state, mark_emit_state, mark_varasm_state, mark_optab): Likewise. * optabs.c: Include ggc.h. (mark_optab): New function. (init_optabs): Add gc roots. * stmt.c: Include ggc.h. (mark_cond_nesting, mark_loop_nesting): New functions. (mark_block_nesting, mark_case_nesting, mark_goto_fixup): Likewise. (mark_stmt_state): New function. * toplev.c (compile_file): Call init_function_once. * tree.c: Include ggc.h. (type_hash): Move declaration earlier in file. (TYPE_HASH_SIZE, type_hash_table): Likewise. (init_obstacks): Add gc roots. (mark_type_hash): New function. * varasm.c: Include ggc.h. (mark_pool_constant): New function. (mark_varasm_state): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29119 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 3f25a982929..33b16fe87bd 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -46,6 +46,7 @@ Boston, MA 02111-1307, USA. */
#include "obstack.h"
#include "c-pragma.h"
+#include "ggc.h"
#ifdef XCOFF_DEBUGGING_INFO
#include "xcoffout.h"
@@ -186,6 +187,7 @@ static void asm_output_bss PROTO((FILE *, tree, char *, int, int));
static void asm_output_aligned_bss PROTO((FILE *, tree, char *, int, int));
#endif
#endif /* BSS_SECTION_ASM_OP */
+static void mark_pool_constant PROTO((struct pool_constant *));
static enum in_section { no_section, in_text, in_data, in_named
#ifdef BSS_SECTION_ASM_OP
@@ -3186,6 +3188,29 @@ init_varasm_status (f)
p->x_const_double_chain = 0;
}
+/* Mark PC for GC. */
+
+static void
+mark_pool_constant (pc)
+ struct pool_constant *pc;
+{
+ while (pc)
+ {
+ ggc_mark_rtx (pc->constant);
+ pc = pc->next;
+ }
+}
+
+/* Mark P for GC. */
+
+void
+mark_varasm_state (p)
+ struct varasm_status *p;
+{
+ mark_pool_constant (p->x_first_pool);
+ ggc_mark_rtx (p->x_const_double_chain);
+}
+
/* Clear out all parts of our state in F that can safely be discarded
after the function has been compiled. */
void