X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=include%2Flibfirm%2Fexecfreq.h;h=95846f371e3b1151a9328bb24144b6b35f663b55;hb=ce29d67e4cf75e435dd50b15a294a07a3b3e6309;hp=4dda2fed358b725ba8572d5ba140e1b492d93f7a;hpb=f8cc15664f571aa7ef89d6f6bc8d5bd2b8ca7d53;p=libfirm diff --git a/include/libfirm/execfreq.h b/include/libfirm/execfreq.h index 4dda2fed3..95846f371 100644 --- a/include/libfirm/execfreq.h +++ b/include/libfirm/execfreq.h @@ -29,30 +29,28 @@ #include "firm_types.h" #include "begin.h" -struct ir_exec_freq; - -/** - * Create execfreq structure (to be used with set_execfreq) - */ -FIRM_API ir_exec_freq *create_execfreq(ir_graph *irg); - /** - * Set execution frequency of a basic block + * @ingroup irana + * @defgroup execfreq Basic Block Execution Frequency + * + * Execution frequencies specify how often a basic block is expected to get + * executed during execution of a function. + * For example the start block has a natural execution frequency of 1.0, the + * two branches of a simple if 0.5, nodes in a simple loop 10.0 ... + * Execution frequencies can either get estimated based on the structure of the + * control flow graph or can be calculated based on profile information. + * @{ */ -FIRM_API void set_execfreq(ir_exec_freq *ef, const ir_node *block, double freq); -/** - * Create execfreq structure and initialize with estimated frequencies +/** Estimates execution frequency of a graph. + * You can query the frequencies with get_block_execfreq(). */ -FIRM_API ir_exec_freq *compute_execfreq(ir_graph *irg, double loop_weight); - -FIRM_API void free_execfreq(ir_exec_freq *ef); +FIRM_API void ir_estimate_execfreq(ir_graph *irg); -FIRM_API double get_block_execfreq(const ir_exec_freq *ef, - const ir_node *block); +/** Returns execution frequency of block @p block. */ +FIRM_API double get_block_execfreq(const ir_node *block); -FIRM_API unsigned long get_block_execfreq_ulong(const ir_exec_freq *ef, - const ir_node *block); +/** @} */ #include "end.h"