3 * File name: ir/stat/firmstat.h
4 * Purpose: Statistics for Firm.
8 * Copyright: (c) 2004 Universität Karlsruhe
9 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
22 * Statistic options, can be or'ed.
24 enum firmstat_options_t {
25 FIRMSTAT_ENABLED = 0x00000001, /**< enable statistics */
26 FIRMSTAT_PATTERN_ENABLED = 0x00000002, /**< enable pattern calculation */
27 FIRMSTAT_COUNT_STRONG_OP = 0x00000004, /**< if set, count Mul/Div/Mod/DivMod by constant */
28 FIRMSTAT_COUNT_DAG = 0x00000008, /**< if set, count DAG statistics */
29 FIRMSTAT_COUNT_DELETED = 0x00000010, /**< if set, count deleted graphs */
30 FIRMSTAT_COUNT_SELS = 0x00000020, /**< if set, count Sel(Sel(..)) differently */
31 FIRMSTAT_CSV_OUTPUT = 0x10000000 /**< CSV output of some mini-statistic */
35 * Finish the statistics.
36 * Never called from libFirm should be called from user.
38 * @param name basename of the statistic output file
40 void stat_finish(const char *name);
42 #ifdef FIRM_STATISTICS
45 * initialize the statistics module.
47 * @param enable_options a bitmask containing the statistic options
49 void init_stat(unsigned enable_options);
53 #define init_stat(enable_options)
55 #endif /* FIRM_STATISTICS */
57 #endif /* _FIRMSTAT_H_ */