+2011-05-02 Richard Guenther <rguenther@suse.de>
+
+ * tree.c (tree_code_counts): New global array.
+ (record_node_allocation_statistics): Count individual tree codes.
+ (dump_tree_statistics): Dump individual code stats.
+
2011-05-01 Jan Hubicka <jh@suse.cz>
* ipa-inline.c (caller_growth_limits): Fix thinko when
#ifdef GATHER_STATISTICS
/* Statistics-gathering stuff. */
+static int tree_code_counts[MAX_TREE_CODES];
int tree_node_counts[(int) all_kinds];
int tree_node_sizes[(int) all_kinds];
gcc_unreachable ();
}
+ tree_code_counts[(int) code]++;
tree_node_counts[(int) kind]++;
tree_node_sizes[(int) kind] += length;
#endif
if (t1 != 0)
{
#ifdef GATHER_STATISTICS
+ tree_code_counts[(int) TREE_CODE (type)]--;
tree_node_counts[(int) t_kind]--;
tree_node_sizes[(int) t_kind] -= sizeof (struct tree_type);
#endif
fprintf (stderr, "---------------------------------------\n");
fprintf (stderr, "%-20s %7d %10d\n", "Total", total_nodes, total_bytes);
fprintf (stderr, "---------------------------------------\n");
+ fprintf (stderr, "Code Nodes\n");
+ fprintf (stderr, "----------------------------\n");
+ for (i = 0; i < (int) MAX_TREE_CODES; i++)
+ fprintf (stderr, "%-20s %7d\n", tree_code_name[i], tree_code_counts[i]);
+ fprintf (stderr, "----------------------------\n");
ssanames_print_statistics ();
phinodes_print_statistics ();
#else