From 455419a530baf5901f1042fab7e2b6b57dab67ed Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 8 Oct 1999 11:59:27 -0700 Subject: lists.c (init_EXPR_INSN_LIST_cache): Don't need to zap the cache every function if ggc_p. * lists.c (init_EXPR_INSN_LIST_cache): Don't need to zap the cache every function if ggc_p. From-SVN: r29872 --- gcc/lists.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'gcc/lists.c') diff --git a/gcc/lists.c b/gcc/lists.c index 90b6796..8c622a6 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. */ -- cgit v1.1