[r13918]
[libfirm] / ir / common / statistics.h
1 /*
2  * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief    Compute statistics about firm library.
23  * @author   Goetz Lindenmaier
24  * @version  $Id$
25  * @summary
26  *  This file defines a set ouf routines to output statistics
27  *  about the firm library.  These statistics include
28  *   - number of datastructures allocated, as entities, types, nodes...
29  *   - memory consumption of data structures
30  *   - effectiveness of optimizations
31  *   - ... more to come.
32  *
33  *  This file is thought for compiler optimization, not to run it in a
34  *  production compiler. I.e., the routines may be inefficient.
35  */
36 #ifndef FIRM_COMMON_STATISTICS_H
37 #define FIRM_COMMON_STATISTICS_H
38
39 /* Statistics about allocated datastructures: counts. */
40 /** verbosity:
41  *  0: information about the whole program
42  *  1: information per type/procedure
43  */
44
45 void print_all_counts(int verbosity);
46
47 /** Prints number of irgraphs, number of nodes in them and
48  *  totals in intRAprocedural view. */
49 void print_graph_counts(int verbosity);
50
51 /** Prints number of types, number of entities and totals.
52  *  Does not consider frame types or types to representent call by
53  *  value arguments/results. */
54 void print_type_counts(int verbosity);
55
56 /** Prints number of tarvals.
57  *   */
58 void print_tarval_counts(int verbosity);
59
60 /** Prints number of idents.
61  *   */
62 void print_ident_counts(int verbosity);
63
64
65 #endif