This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PCH] remove some unused GC stuff



There was a bunch of stuff that wasn't used, or easily removed.

Will commit when boostrapped & tested on i686-pc-linux-gnu (with
default configure flags).

-- 
Geoff Keating <geoffk@redhat.com>

===File ~/patches/pchbranch-ggctidy.patch===================
2002-04-28  Geoffrey Keating  <geoffk@redhat.com>

	* ggc-common.c (ggc_mark_rtvec_children): Delete.
	(ggc_mark_rtx_children): Use generic name for ggc_mark_rtvec.
	(lang_mark_false_label_stack): Delete.
	* rtl.h (struct rtvec_def): Use gengtype to mark.
	* ggc.h (ggc_mark_rtvec): Delete.
	(gt_ggc_m_rtvec_def): Delete.
	(ggc_mark_nonnull_tree): Delete.
	(ggc_mark_rtvec_children): Delete prototype.
	(lang_mark_false_label_stack): Delete declaration.

Index: ggc-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ggc-common.c,v
retrieving revision 1.46.4.8
diff -p -u -p -r1.46.4.8 ggc-common.c
--- ggc-common.c	9 Apr 2002 21:56:29 -0000	1.46.4.8
+++ ggc-common.c	28 Apr 2002 21:41:29 -0000
@@ -34,12 +34,6 @@ Software Foundation, 59 Temple Place - S
 /* Statistics about the allocation.  */
 static ggc_statistics *ggc_stats;
 
-/* The FALSE_LABEL_STACK, declared in except.h, has language-dependent
-   semantics.  If a front-end needs to mark the false label stack, it
-   should set this pointer to a non-NULL value.  Otherwise, no marking
-   will be done.  */
-void (*lang_mark_false_label_stack) PARAMS ((struct label_node *));
-
 /* Trees that have been marked, but whose children still need marking.  */
 varray_type ggc_pending_trees;
 
@@ -323,26 +317,12 @@ ggc_mark_rtx_children (r)
 		} 
 	      break;
 	    case 'V': case 'E':
-	      ggc_mark_rtvec (XVEC (r, i));
+	      gt_ggc_m_rtvec_def (XVEC (r, i));
 	      break;
 	    }
 	}
     }
   while ((r = next_rtx) != NULL);
-}
-
-/* V had not been previously marked, but has now been marked via
-   ggc_set_mark.  Now recurse and process the children.  */
-
-void
-ggc_mark_rtvec_children (v)
-     rtvec v;
-{
-  int i;
-
-  i = GET_NUM_ELEM (v);
-  while (--i >= 0)
-    ggc_mark_rtx (RTVEC_ELT (v, i));
 }
 
 /* Recursively set marks on all of the children of the
Index: ggc.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ggc.h,v
retrieving revision 1.39.6.8
diff -p -u -p -r1.39.6.8 ggc.h
--- ggc.h	9 Apr 2002 21:56:29 -0000	1.39.6.8
+++ ggc.h	28 Apr 2002 21:41:29 -0000
@@ -82,7 +82,6 @@ extern void ggc_mark_tree_hash_table	PAR
 extern void ggc_mark_roots		PARAMS ((void));
 
 extern void ggc_mark_rtx_children	PARAMS ((struct rtx_def *));
-extern void ggc_mark_rtvec_children	PARAMS ((struct rtvec_def *));
 
 extern void gt_ggc_m_rtx_def		PARAMS ((void *));
 extern void gt_ggc_m_tree_node		PARAMS ((void *));
@@ -107,22 +106,6 @@ extern void gt_ggc_m_tree_node		PARAMS (
       VARRAY_PUSH_TREE (ggc_pending_trees, t__);	\
   } while (0)
 
-#define ggc_mark_nonnull_tree(EXPR)			\
-  do {							\
-    tree t__ = (EXPR);					\
-    if (! ggc_set_mark (t__))				\
-      VARRAY_PUSH_TREE (ggc_pending_trees, t__);	\
-  } while (0)
-
-#define ggc_mark_rtvec(EXPR)                    \
-  do {                                          \
-    rtvec v__ = (EXPR);                         \
-    if (ggc_test_and_set_mark (v__))            \
-      ggc_mark_rtvec_children (v__);            \
-  } while (0)
-
-#define gt_ggc_m_rtvec_def ggc_mark_rtvec
-
 #define ggc_mark(EXPR)				\
   do {						\
     const void *a__ = (EXPR);			\
@@ -193,12 +176,6 @@ extern int ggc_marked_p			PARAMS ((const
 /* This is the language's opportunity to mark nodes held through
    the lang_specific hooks in the tree.  */
 extern void lang_mark_tree		PARAMS ((union tree_node *));
-
-/* The FALSE_LABEL_STACK, declared in except.h, has language-dependent
-   semantics.  If a front-end needs to mark the false label stack, it
-   should set this pointer to a non-NULL value.  Otherwise, no marking
-   will be done.  */
-extern void (*lang_mark_false_label_stack) PARAMS ((struct label_node *));
 
 /* Statistics.  */
 
Index: rtl.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl.h,v
retrieving revision 1.324.4.4
diff -p -u -p -r1.324.4.4 rtl.h
--- rtl.h	14 Mar 2002 21:34:53 -0000	1.324.4.4
+++ rtl.h	28 Apr 2002 21:41:29 -0000
@@ -219,9 +219,9 @@ struct rtx_def
    for a variable number of things.  The principle use is inside
    PARALLEL expressions.  */
 
-struct rtvec_def {
+struct rtvec_def GTY(()) {
   int num_elem;		/* number of elements */
-  rtx elem[1];
+  rtx GTY ((length ("%.num_elem"))) elem[1];
 };
 
 #define NULL_RTVEC (rtvec) 0
============================================================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]