3 * File name: ir/stat/firmstat.h
4 * Purpose: Statistics for Firm.
8 * Copyright: (c) 2004 Universität Karlsruhe
9 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
21 #ifdef FIRM_STATISTICS
24 STAT_OPT_STG, /**< straightening optimization */
25 STAT_OPT_IFSIM, /**< if simplification */
26 STAT_OPT_ALGSIM, /**< algebraic simplification */
27 STAT_OPT_PHI, /**< Phi optmization */
28 STAT_OPT_WAW, /**< Write-After-Write optimization */
29 STAT_OPT_WAR, /**< Write-After-Read optimization */
30 STAT_OPT_RAW, /**< Read-After-Write optimization */
31 STAT_OPT_TUPLE, /**< Tuple optimization */
32 STAT_OPT_ID, /**< ID optimization */
33 STAT_OPT_CONST_EVAL, /**< constant evaluation */
34 STAT_LOWERED, /**< lowered */
40 * initialize the statistics module.
45 * Finish the statistics.
47 void stat_finish(void);
50 * A new IR op is registered.
52 void stat_new_ir_op(const ir_op *op);
57 void stat_free_ir_op(const ir_op *op);
60 * A new node is created.
62 void stat_new_node(const ir_node *node);
65 * A node is changed into a Id node
67 void stat_turn_into_id(const ir_node *node);
70 * A new graph was created
72 void stat_new_graph(ir_graph *irg, entity *ent);
77 void stat_free_graph(ir_graph *irg);
80 * A walk over a graph is initiated
82 void stat_irg_walk(ir_graph *irg, void *pre, void *post);
85 * A walk over the graph's blocks is initiated
87 void stat_irg_block_walk(ir_graph *irg, const ir_node *node, void *pre, void *post);
90 * Some nodes were optimized into some others due to an optimization
92 void stat_merge_nodes(
93 ir_node **new_node_array, int new_num_entries,
94 ir_node **old_node_array, int old_num_entries,
98 * A node was lowered into other nodes
100 void stat_lower(ir_node *node);
103 * A graph was inlined
105 void stat_inline(ir_node *call, ir_graph *irg);
108 * A graph with tail-recursions was optimized.
110 void stat_tail_rec(ir_graph *irg);
113 * Start the dead node elimination.
115 void stat_dead_node_elim_start(ir_graph *irg);
118 * Stops the dead node elimination.
120 void stat_dead_node_elim_stop(ir_graph *irg);
125 #define stat_finish()
126 #define stat_new_ir_op(op)
127 #define stat_free_ir_op(op)
128 #define stat_new_node(node)
129 #define stat_turn_into_id(node)
130 #define stat_new_graph(irg, ent)
131 #define stat_free_graph(irg)
132 #define stat_irg_walk(irg, pre, post)
133 #define stat_irg_block_walk(irg, node, pre, post)
134 #define stat_merge_nodes(new_node_array, new_num_entries, old_node_array, old_num_entries, opt)
135 #define stat_lower(node)
136 #define stat_inline(call, irg)
137 #define stat_tail_rec(irg)
138 #define stat_dead_node_elim_start(irg)
139 #define stat_dead_node_elim_stop(irg)
143 #endif /* _FIRMSTAT_H_ */