summaryrefslogtreecommitdiff
path: root/gcc/lists.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-08 11:46:28 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-08 11:46:28 +0000
commitd8fcbd1d20c6ea5a9cd04f6c4d4e677ef8fb523d (patch)
tree293e64cd3e51def1b9610239226205650ee003aa /gcc/lists.c
parent76660157d5f0f19cd620e4a038609950a3047a45 (diff)
downloadgcc-d8fcbd1d20c6ea5a9cd04f6c4d4e677ef8fb523d.tar.gz
* lists.c: Include ggc.h.
(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
Diffstat (limited to 'gcc/lists.c')
-rw-r--r--gcc/lists.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/lists.c b/gcc/lists.c
index 331b9538b3d..e0cb419e68e 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;
}