diff options
author | Richard Henderson <rth@cygnus.com> | 1999-09-08 04:46:28 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 1999-09-08 04:46:28 -0700 |
commit | 7cf3d8b413d6c4de263ff9e8049481760e9bb3d5 (patch) | |
tree | 293e64cd3e51def1b9610239226205650ee003aa /gcc | |
parent | 29ffdfbb0f93ac4ee072ae0c818c2b75d5f8cff1 (diff) | |
download | gcc-7cf3d8b413d6c4de263ff9e8049481760e9bb3d5.zip gcc-7cf3d8b413d6c4de263ff9e8049481760e9bb3d5.tar.gz gcc-7cf3d8b413d6c4de263ff9e8049481760e9bb3d5.tar.bz2 |
lists.c: Include ggc.h.
* lists.c: Include ggc.h.
(zap_lists): New.
(init_EXPR_INSN_LIST_cache): Install it.
From-SVN: r29205
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/Makefile.in | 2 | ||||
-rw-r--r-- | gcc/lists.c | 17 |
3 files changed, 24 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9e692da..e7059a9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index ce56466..6ce461c 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1607,7 +1607,7 @@ reg-stack.o : reg-stack.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) recog.h \ $(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 \ diff --git a/gcc/lists.c b/gcc/lists.c index 331b953..e0cb419 100644 --- a/gcc/lists.c +++ b/gcc/lists.c @@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA. */ #include "system.h" #include "toplev.h" #include "rtl.h" +#include "ggc.h" /* Functions for maintaining cache-able lists of EXPR_LIST and INSN_LISTs. */ @@ -104,9 +105,25 @@ alloc_EXPR_LIST (kind, val, next) } /* 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; } |