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]

[patch] cgraph.c: Remove a write-only global variable.


Hi,

Attached is a patch to remove a write-only global variable.

Tested on i686-pc-linux-gnu.  OK to apply?

Kazu Hirata

2005-01-23  Kazu Hirata  <kazu@cs.umass.edu>

	* cgraph.c (cgraph_varpool_n_nodes): Remove.
	(cgraph_varpool_node): Don't access cgraph_varpool_n_nodes.
	* cgraph.h: Remove the corresponding declaration.

Index: cgraph.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cgraph.c,v
retrieving revision 1.63
diff -u -d -p -r1.63 cgraph.c
--- cgraph.c	18 Jan 2005 11:36:00 -0000	1.63
+++ cgraph.c	23 Jan 2005 03:53:18 -0000
@@ -120,9 +120,6 @@ static GTY((param_is (struct cgraph_varp
 /* Queue of cgraph nodes scheduled to be lowered and output.  */
 struct cgraph_varpool_node *cgraph_varpool_nodes_queue;
 
-/* Number of nodes in existence.  */
-int cgraph_varpool_n_nodes;
-
 /* The linked list of cgraph varpool nodes.  */
 static GTY(())  struct cgraph_varpool_node *cgraph_varpool_nodes;
 
@@ -584,7 +581,6 @@ cgraph_varpool_node (tree decl)
   node = ggc_alloc_cleared (sizeof (*node));
   node->decl = decl;
   node->next = cgraph_varpool_nodes;
-  cgraph_varpool_n_nodes++;
   cgraph_varpool_nodes = node;
   *slot = node;
   return node;
Index: cgraph.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cgraph.h,v
retrieving revision 1.43
diff -u -d -p -r1.43 cgraph.h
--- cgraph.h	18 Jan 2005 11:36:00 -0000	1.43
+++ cgraph.h	23 Jan 2005 03:53:18 -0000
@@ -158,7 +158,6 @@ extern GTY(()) int cgraph_max_uid;
 extern bool cgraph_global_info_ready;
 extern GTY(()) struct cgraph_node *cgraph_nodes_queue;
 
-extern GTY(()) int cgraph_varpool_n_nodes;
 extern GTY(()) struct cgraph_varpool_node *cgraph_varpool_nodes_queue;
 
 /* In cgraph.c  */


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