X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeprofile.h;h=6d136a6e2fdf0a7e3ab43c543d22b8d4b1a2f18c;hb=a92ff34e623ded0eb85277c1f37235947855dffb;hp=542601e6cded8f56693157af027a047493b34fd8;hpb=c6e2a2ca59b65e4939d0af1088cca3f9e1a0bab1;p=libfirm diff --git a/ir/be/beprofile.h b/ir/be/beprofile.h index 542601e6c..6d136a6e2 100644 --- a/ir/be/beprofile.h +++ b/ir/be/beprofile.h @@ -13,19 +13,28 @@ #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 - * @param filename The name of the output file for the profile information + * + * @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(char * filename); +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(char * filename); +void be_profile_read(const char *filename); /** * Frees the profile info @@ -37,6 +46,11 @@ void be_profile_free(void); */ 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 */