diff options
author | Richard Henderson <rth@cygnus.com> | 1999-10-08 11:59:27 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 1999-10-08 11:59:27 -0700 |
commit | 455419a530baf5901f1042fab7e2b6b57dab67ed (patch) | |
tree | cddcb39175d25fa392549428b86287ef7cad01e3 /gcc | |
parent | a6de7040f89c411df4fd8e8ddd98717a43ac313b (diff) | |
download | gcc-455419a530baf5901f1042fab7e2b6b57dab67ed.zip gcc-455419a530baf5901f1042fab7e2b6b57dab67ed.tar.gz gcc-455419a530baf5901f1042fab7e2b6b57dab67ed.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/lists.c | 21 |
2 files changed, 19 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dfe8f96..73b4843 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Fri Oct 8 11:58:34 1999 Richard Henderson <rth@cygnus.com> + + * lists.c (init_EXPR_INSN_LIST_cache): Don't need to zap the + cache every function if ggc_p. + Fri Oct 8 18:46:11 1999 Bernd Schmidt <bernds@cygnus.co.uk> * jump.c (duplicate_loop_exit_test): Use copy_insn/copy_insn_1 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. */ |