(zap_lists): New.
(init_EXPR_INSN_LIST_cache): Install it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29205
138bc75d-0d04-0410-961f-
82ee72b054a4
+Wed Sep 8 04:43:22 1999 Richard Henderson <rth@cygnus.com>
+
+ * lists.c: Include ggc.h.
+ (zap_lists): New.
+ (init_EXPR_INSN_LIST_cache): Install it.
+
Wed Sep 8 11:14:25 1999 Andreas Schwab <schwab@suse.de>
* cccp.c (main): Fix handling of -include and -imacros options.
$(REGS_H) hard-reg-set.h flags.h insn-config.h insn-flags.h toplev.h \
varray.h function.h
dyn-string.o: dyn-string.c dyn-string.h $(CONFIG_H) system.h
-lists.o: lists.c $(CONFIG_H) system.h toplev.h $(RTL_H)
+lists.o: lists.c $(CONFIG_H) system.h toplev.h $(RTL_H) ggc.h
$(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) ggc.h \
$(RTL_H) $(REGS_H) hard-reg-set.h real.h insn-config.h conditions.h \
#include "system.h"
#include "toplev.h"
#include "rtl.h"
+#include "ggc.h"
/* Functions for maintaining cache-able lists of EXPR_LIST and INSN_LISTs. */
}
/* This function will initialize the EXPR_LIST and INSN_LIST caches. */
+
+static void
+zap_lists (dummy)
+ void *dummy ATTRIBUTE_UNUSED;
+{
+ unused_expr_list = NULL;
+ unused_insn_list = NULL;
+}
+
void
init_EXPR_INSN_LIST_cache ()
{
+ static int initialized;
+ if (!initialized)
+ {
+ initialized = 1;
+ ggc_add_root (&unused_expr_list, 1, 1, zap_lists);
+ }
+
unused_expr_list = NULL;
unused_insn_list = NULL;
}