summaryrefslogtreecommitdiff
path: root/gcc/lists.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1999-10-08 18:59:27 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1999-10-08 18:59:27 +0000
commit85dbc28fc4768b417a20d83d9e2da3f4fc20e0d3 (patch)
treecddcb39175d25fa392549428b86287ef7cad01e3 /gcc/lists.c
parenta0555725cabcd9aca66e1ba1fdcaeac3f8f2b4fa (diff)
downloadgcc-85dbc28fc4768b417a20d83d9e2da3f4fc20e0d3.tar.gz
* lists.c (init_EXPR_INSN_LIST_cache): Don't need to zap the
cache every function if ggc_p. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29872 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lists.c')
-rw-r--r--gcc/lists.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/gcc/lists.c b/gcc/lists.c
index 90b67966b15..8c622a6a153 100644
--- a/gcc/lists.c
+++ b/gcc/lists.c
@@ -120,15 +120,22 @@ zap_lists (dummy)
void
init_EXPR_INSN_LIST_cache ()
{
- static int initialized;
- if (!initialized)
+ if (ggc_p)
{
- initialized = 1;
- ggc_add_root (&unused_expr_list, 1, 1, zap_lists);
+ static int initialized;
+ if (!initialized)
+ {
+ initialized = 1;
+ ggc_add_root (&unused_expr_list, 1, 1, zap_lists);
+ }
+
+ /* No need to squish the lists across functions with GC enabled. */
+ }
+ else
+ {
+ unused_expr_list = NULL;
+ unused_insn_list = NULL;
}
-
- unused_expr_list = NULL;
- unused_insn_list = NULL;
}
/* This function will free up an entire list of EXPR_LIST nodes. */