aboutsummaryrefslogtreecommitdiff
path: root/gcc/optabs.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1999-09-04 19:41:35 -0700
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-09-05 02:41:35 +0000
commit87ff9c8e4bb514b8298fcd6431339197de456c0a (patch)
treee5cebe68f9343bcd10b7be75a8d15ab8791ec212 /gcc/optabs.c
parent6621f41de9e59ab84880d506f7de8b6ca6eccecb (diff)
downloadgcc-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/optabs.c')
-rw-r--r--gcc/optabs.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c
index ae6a6ff..d82eb2e 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -35,6 +35,7 @@ Boston, MA 02111-1307, USA. */
#include "expr.h"
#include "recog.h"
#include "reload.h"
+#include "ggc.h"
/* Each optab contains info on how this target machine
can perform a particular operation
@@ -4342,6 +4343,18 @@ init_floating_libfuncs (optable, opname, suffix)
init_libfuncs (optable, SFmode, TFmode, opname, suffix);
}
+/* Mark ARG (which is really an OPTAB *) for GC. */
+
+void
+mark_optab (arg)
+ void *arg;
+{
+ optab o = *(optab *) arg;
+ int i;
+
+ for (i = 0; i < NUM_MACHINE_MODES; ++i)
+ ggc_mark_rtx (o->handlers[i].libfunc);
+}
/* Call this once to initialize the contents of the optabs
appropriately for the current target machine. */
@@ -4679,6 +4692,10 @@ init_optabs ()
/* Allow the target to add more libcalls or rename some, etc. */
INIT_TARGET_OPTABS;
#endif
+
+ /* Add these GC roots. */
+ ggc_add_root (optab_table, OTI_MAX, sizeof(optab), mark_optab);
+ ggc_add_rtx_root (libfunc_table, LTI_MAX);
}
#ifdef BROKEN_LDEXP