X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeprofile.h;h=6d136a6e2fdf0a7e3ab43c543d22b8d4b1a2f18c;hb=80a6158fdd766f42ee6c508a773bc114ff1b61f3;hp=f72014d6b221f823c79d7885ed28e84a418182cd;hpb=69294dc3d63c3475637a5486a640eefc50378d36;p=libfirm diff --git a/ir/be/beprofile.h b/ir/be/beprofile.h index f72014d6b..6d136a6e2 100644 --- a/ir/be/beprofile.h +++ b/ir/be/beprofile.h @@ -13,12 +13,47 @@ #ifndef _BEPROFILE_H_ #define _BEPROFILE_H_ +/** Additional flags for profiling */ +enum profile_flags { + profile_with_locations = 0x0001, /**< create location table */ + profile_default = 0 /**< default settings */ +}; + /** - * Instruments irgs with profile code. + * Instruments irgs with profile code + * + * @param filename The name of the output file for the profile information + * @param flags Additional flags + * * @return The irg doing the profile initialization. */ -ir_graph *be_profile_instrument(void); +ir_graph *be_profile_instrument(const char *filename, unsigned flags); + +/** + * Reads the corresponding profile info file if it exists and returns a + * profile info struct + * @param filename The name of the file containing profile information + */ +void be_profile_read(const char *filename); + +/** + * Frees the profile info + */ +void be_profile_free(void); -void be_profile_read(void); +/** + * Get block execution count as determined be profiling + */ +unsigned int be_profile_get_block_execcount(const ir_node * block); + +/** + * Initializes exec_freq structure for an irg based on profile data + */ +ir_exec_freq *be_create_execfreqs_from_profile(ir_graph *irg); + +/** + * Tells whether profile module has acquired data + */ +int be_profile_has_data(void); #endif /* _BEPROFILE_H_ */