more fixes for the Cmp optimization
[libfirm] / ir / stat / firmstat.h
1 /*
2  * Project:     libFIRM
3  * File name:   ir/stat/firmstat.h
4  * Purpose:     Statistics for Firm.
5  * Author:      Michael Beck
6  * Created:
7  * CVS-ID:      $Id$
8  * Copyright:   (c) 2004 Universität Karlsruhe
9  * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
10  */
11 #ifndef _FIRMSTAT_H_
12 #define _FIRMSTAT_H_
13
14 /**
15  * @file firmstat.h
16  */
17 #include "irop.h"
18 #include "irnode.h"
19 #include "irgraph.h"
20
21 /**
22  * Statistic options, can be or'ed.
23  */
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 */
32 };
33
34 /**
35  * Finish the statistics.
36  * Never called from libFirm should be called from user.
37  *
38  * @param name   basename of the statistic output file
39  */
40 void stat_finish(const char *name);
41
42 #ifdef FIRM_STATISTICS
43
44 /**
45  * initialize the statistics module.
46  *
47  * @param enable_options  a bitmask containing the statistic options
48  */
49 void init_stat(unsigned enable_options);
50
51 #else
52
53 #define init_stat(enable_options)
54
55 #endif /* FIRM_STATISTICS */
56
57 #endif /* _FIRMSTAT_H_ */