2 * This file is part of libFirm.
3 * Copyright (C) 2012 University of Karlsruhe.
8 * @brief Code instrumentation and execution count profiling.
9 * @author Adam M. Szalkowski
12 #ifndef FIRM_BE_BEPROFILE_H
13 #define FIRM_BE_BEPROFILE_H
21 * Instruments all irgs in the program with profile code.
22 * The final code will have a counter for each basic block which is
23 * incremented in that block. After the program has run the info is written
26 ir_graph *ir_profile_instrument(const char *filename);
29 * Reads the corresponding profile info file if it exists and returns a
31 * @param filename The name of the file containing profile information
33 bool ir_profile_read(const char *filename);
36 * Frees the profile info
38 void ir_profile_free(void);
41 * Get block execution count as determined be profiling
43 uint32_t ir_profile_get_block_execcount(const ir_node *block);
46 * Initializes exec_freq structure for an irg based on profile data
48 void ir_create_execfreqs_from_profile(void);