1 /** vim: set sw=4 ts=4:
4 * @author Adam M. Szalkowski
7 * Code instrumentation and execution count profiling
9 * Copyright (C) 2006 Universitaet Karlsruhe
10 * Released under the GPL
16 /** Additional flags for profiling */
18 profile_with_locations = 0x0001, /**< create location table */
19 profile_default = 0 /**< default settings */
23 * Instruments irgs with profile code
25 * @param filename The name of the output file for the profile information
26 * @param flags Additional flags
28 * @return The irg doing the profile initialization.
30 ir_graph *be_profile_instrument(const char *filename, unsigned flags);
33 * Reads the corresponding profile info file if it exists and returns a
35 * @param filename The name of the file containing profile information
37 void be_profile_read(const char *filename);
40 * Frees the profile info
42 void be_profile_free(void);
45 * Get block execution count as determined be profiling
47 unsigned int be_profile_get_block_execcount(const ir_node * block);
50 * Initializes exec_freq structure for an irg based on profile data
52 ir_exec_freq *be_create_execfreqs_from_profile(ir_graph *irg);
55 * Tells whether profile module has acquired data
57 int be_profile_has_data(void);
59 #endif /* _BEPROFILE_H_ */