query firmstat options through lc_opt system
[libfirm] / include / libfirm / execfreq.h
index 4dda2fe..95846f3 100644 (file)
 #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"