typos fixed
[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_COUNT_CONSTS    = 0x00000040,    /**< if set, count Const statistics */
32   FIRMSTAT_CSV_OUTPUT      = 0x10000000     /**< CSV output of some mini-statistic */
33 };
34
35 /**
36  * Dump a snapshot of the statistic values.
37  * Never called from libFirm should be called from user.
38  *
39  * @param name   base name of the statistic output file
40  */
41 void stat_dump_snapshot(const char *name);
42
43 /**
44  * initialize the statistics module.
45  *
46  * @param enable_options  a bitmask containing the statistic options
47  */
48 void init_stat(unsigned enable_options);
49
50 /**
51  * terminates the statistics module, frees all memory
52  */
53 void stat_term(void);
54
55 #endif /* _FIRMSTAT_H_ */