diff options
author | Richard Henderson <rth@cygnus.com> | 1999-09-04 19:41:35 -0700 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 1999-09-05 02:41:35 +0000 |
commit | 87ff9c8e4bb514b8298fcd6431339197de456c0a (patch) | |
tree | e5cebe68f9343bcd10b7be75a8d15ab8791ec212 /gcc/emit-rtl.c | |
parent | 6621f41de9e59ab84880d506f7de8b6ca6eccecb (diff) | |
download | gcc-87ff9c8e4bb514b8298fcd6431339197de456c0a.zip gcc-87ff9c8e4bb514b8298fcd6431339197de456c0a.tar.gz gcc-87ff9c8e4bb514b8298fcd6431339197de456c0a.tar.bz2 |
Makefile.in (tree.o): Depend on ggc.h.
* 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.
Co-Authored-By: Bernd Schmidt <bernds@cygnus.co.uk>
Co-Authored-By: Mark Mitchell <mark@codesourcery.com>
From-SVN: r29119
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index fd04427..a781e2d 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -49,6 +49,7 @@ Boston, MA 02111-1307, USA. */ #include "real.h" #include "obstack.h" #include "bitmap.h" +#include "ggc.h" /* Commonly used modes. */ @@ -187,6 +188,7 @@ static rtx free_insn; static rtx make_jump_insn_raw PROTO((rtx)); static rtx make_call_insn_raw PROTO((rtx)); static rtx find_line_note PROTO((rtx)); +static void mark_sequence_stack PROTO((struct sequence_stack *)); rtx gen_rtx_CONST_INT (mode, arg) @@ -3467,6 +3469,41 @@ init_emit () #endif } +/* Mark SS for GC. */ + +static void +mark_sequence_stack (ss) + struct sequence_stack *ss; +{ + while (ss) + { + ggc_mark_rtx (ss->first); + ggc_mark_tree (ss->sequence_rtl_expr); + ss = ss->next; + } +} + +/* Mark ES for GC. */ + +void +mark_emit_state (es) + struct emit_status *es; +{ + rtx *r; + int i; + + if (es == 0) + return; + + for (i = es->regno_pointer_flag_length, r = es->x_regno_reg_rtx; + i > 0; --i, ++r) + ggc_mark_rtx (*r); + + mark_sequence_stack (es->sequence_stack); + ggc_mark_tree (es->sequence_rtl_expr); + ggc_mark_rtx (es->x_first_insn); +} + /* Create some permanent unique rtl objects shared between all functions. LINE_NUMBERS is nonzero if line numbers are to be generated. */ |