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]

[lto] PATCH: fix TREE_LIST memory statistics reporting


Already committed as "obvious".

-Sandra


2006-08-15  Sandra Loosemore  <sandra@codesourcery.com>

	* gcc/tree.h (tree_node_kind): Combine unused perm_list_kind and
	temp_list_kind into a single list_kind.
	* gcc/tree.c (tree_node_kind_names): Likewise.
	(make_node_stat, tree_cons_stat): Report TREE_LIST statistics as
	list_kind instead of x_kind.
Index: gcc/tree.h
===================================================================
*** gcc/tree.h	(revision 116152)
--- gcc/tree.h	(working copy)
*************** typedef enum
*** 4579,4586 ****
    e_kind,
    c_kind,
    id_kind,
!   perm_list_kind,
!   temp_list_kind,
    vec_kind,
    binfo_kind,
    phi_kind,
--- 4579,4585 ----
    e_kind,
    c_kind,
    id_kind,
!   list_kind,
    vec_kind,
    binfo_kind,
    phi_kind,
Index: gcc/tree.c
===================================================================
*** gcc/tree.c	(revision 116152)
--- gcc/tree.c	(working copy)
*************** static const char * const tree_node_kind
*** 89,96 ****
    "exprs",
    "constants",
    "identifiers",
!   "perm_tree_lists",
!   "temp_tree_lists",
    "vecs",
    "binfos",
    "phi_nodes",
--- 89,95 ----
    "exprs",
    "constants",
    "identifiers",
!   "tree_lists",
    "vecs",
    "binfos",
    "phi_nodes",
*************** make_node_stat (enum tree_code code MEM_
*** 500,505 ****
--- 499,508 ----
  	  kind = id_kind;
  	  break;
  
+ 	case TREE_LIST:
+ 	  kind = list_kind;
+ 	  break;
+ 
  	case TREE_VEC:
  	  kind = vec_kind;
  	  break;
*************** tree_cons_stat (tree purpose, tree value
*** 1751,1758 ****
    memset (node, 0, sizeof (struct tree_common));
  
  #ifdef GATHER_STATISTICS
!   tree_node_counts[(int) x_kind]++;
!   tree_node_sizes[(int) x_kind] += sizeof (struct tree_list);
  #endif
  
    TREE_SET_CODE (node, TREE_LIST);
--- 1754,1761 ----
    memset (node, 0, sizeof (struct tree_common));
  
  #ifdef GATHER_STATISTICS
!   tree_node_counts[(int) list_kind]++;
!   tree_node_sizes[(int) list_kind] += sizeof (struct tree_list);
  #endif
  
    TREE_SET_CODE (node, TREE_LIST);

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