some more debug output if no definition for a value is found on a path
[libfirm] / ir / be / beprofile.h
1 /** vim: set sw=4 ts=4:
2  * @file   beprofile.h
3  * @date   2006-04-06
4  * @author Adam M. Szalkowski
5  * @cvs-id $Id$
6  *
7  * Code instrumentation and execution count profiling
8  *
9  * Copyright (C) 2006 Universitaet Karlsruhe
10  * Released under the GPL
11  */
12
13 #ifndef _BEPROFILE_H_
14 #define _BEPROFILE_H_
15
16 /** Additional flags for profiling */
17 enum profile_flags {
18         profile_with_locations = 0x0001,   /**< create location table */
19         profile_default        = 0         /**< default settings */
20 };
21
22 /**
23  * Instruments irgs with profile code
24  *
25  * @param filename  The name of the output file for the profile information
26  * @param flags     Additional flags
27  *
28  * @return The irg doing the profile initialization.
29  */
30 ir_graph *be_profile_instrument(const char *filename, unsigned flags);
31
32 /**
33  * Reads the corresponding profile info file if it exists and returns a
34  * profile info struct
35  * @param filename The name of the file containing profile information
36  */
37 void be_profile_read(const char *filename);
38
39 /**
40  * Frees the profile info
41  */
42 void be_profile_free(void);
43
44 /**
45  * Get block execution count as determined be profiling
46  */
47 unsigned int be_profile_get_block_execcount(const ir_node * block);
48
49 /**
50  * Initializes exec_freq structure for an irg based on profile data
51  */
52 exec_freq_t *be_create_execfreqs_from_profile(ir_graph *irg);
53
54 /**
55  * Tells whether profile module has acquired data
56  */
57 int be_profile_has_data(void);
58
59 #endif /* _BEPROFILE_H_ */