2 * Provides several statistic functions for the backend.
3 * @author Christian Wuerdig
10 #include "firm_config.h"
12 #include "benodesets.h"
14 #ifdef FIRM_STATISTICS
17 * Collects statistics information about register pressure.
18 * @param birg The be irg object containing the irg
20 void be_do_stat_reg_pressure(be_irg_t *birg);
23 * Collect statistics about amount of ready nodes per block
24 * @param block The block
25 * @param ready_set A set of ready nodes
27 void be_do_stat_sched_ready(ir_node *block, nodeset *ready_set);
30 * Pass information about a perm to the statistic module.
32 * @param class_name the name of the register class
33 * @param n_regs number of registers in the register class
34 * @param perm the perm node
35 * @param block the block containing the perm
36 * @param size the size of the perm
37 * @param real_size number of pairs with different registers
39 void be_do_stat_perm(const char *class_name, int n_regs, ir_node *perm, ir_node *block, int n, int real_size);
42 * Pass information about a cycle or chain in a perm to the statistic module.
44 * @param class_name the name of the register class
45 * @param perm the perm node
46 * @param block the block containing the perm
47 * @param is_chain 1 if chain, 0 if cycle
48 * @param size length of the cycle/chain
49 * @param n_ops the number of ops representing this cycle/chain after lowering
51 void be_do_stat_permcycle(const char *class_name, ir_node *perm, ir_node *block, int is_chain, int n_elems, int n_ops);
54 * Collects node statistics.
56 * @param irg the to do statistics for
57 * @param phase the phase to collect the statistic for
59 void be_do_stat_nodes(ir_graph *irg, const char *phase);
62 * Performs initialization for be node statistics.
64 void be_stat_init_irg(const arch_env_t *arch_env, ir_graph *irg);
68 #define be_stat_init_irg(arch_env, irg)
69 #define be_do_stat_nodes(irg, phase)
70 #define be_do_stat_reg_pressure(birg)
71 #define be_do_stat_sched_ready(block, ready_set)
72 #define be_do_stat_perm(class_name, n_regs, perm, block, n, real_size)
73 #define be_do_stat_permcycle(class_name, perm, block, is_chain, n_elems, n_ops)
75 #endif /* FIRM_STATISTICS */
77 #endif /* _BESTAT_H_ */