This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
gc tweek for lists
- To: gcc-patches at gcc dot gnu dot org
- Subject: gc tweek for lists
- From: Richard Henderson <rth at cygnus dot com>
- Date: Wed, 8 Sep 1999 04:53:49 -0700
The following allows an Alpha to make it into stage1 with ggc _on_
in the C front end. This surely isn't the cleanest way to do this,
but it is late. ;-P
Mark, during testing I would suggest
@@ -637,7 +642,7 @@ ggc_collect ()
struct ggc_status *gs;
int time, n_rtxs, n_trees, n_vecs, n_strings;
-#ifndef ENABLE_CHECKING
+#if 0
/* See if it's even worth our while. */
if (ggc_chain->bytes_alloced_since_gc < 64*1024)
return;
as that does catch all sorts of missing roots that might
ordinarily slip by.
r~
* lists.c: Include ggc.h.
(zap_lists): New.
(init_EXPR_INSN_LIST_cache): Install it.
Index: lists.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/lists.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -c -p -d -r1.2 -r1.3
*** lists.c 1999/09/04 15:08:55 1.2
--- lists.c 1999/09/08 11:46:28 1.3
*************** Boston, MA 02111-1307, USA. */
*** 22,27 ****
--- 22,28 ----
#include "system.h"
#include "toplev.h"
#include "rtl.h"
+ #include "ggc.h"
/* Functions for maintaining cache-able lists of EXPR_LIST and INSN_LISTs. */
*************** alloc_EXPR_LIST (kind, val, next)
*** 104,112 ****
--- 105,129 ----
}
/* 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;
}