* An entry for ir_graphs. These numbers are calculated for every IR graph.
*/
typedef struct _graph_entry_t {
+ struct obstack recalc_cnts; /**< obstack containing the counters that are recalculated */
HASH_MAP(node_entry_t) *opcode_hash; /**< hash map containing the opcode counter */
HASH_MAP(block_entry_t) *block_hash; /**< hash map containing the block counter */
+ HASH_MAP(block_entry_t) *extbb_hash; /**< hash map containing the extended block counter */
counter_t cnt_walked; /**< walker walked over the graph */
counter_t cnt_walked_blocks; /**< walker walked over the graph blocks */
counter_t cnt_was_inlined; /**< number of times other graph were inlined */
counter_t cnt_if_conv[IF_RESULT_LAST]; /**< number of if conversions */
counter_t cnt_real_func_call; /**< number real function call optimization */
unsigned num_tail_recursion; /**< number of tail recursion optimizations */
- HASH_MAP(opt_entry_t) *opt_hash[HOOK_OPT_LAST]; /**< hash maps containing opcode counter for optimizations */
+ HASH_MAP(opt_entry_t) *opt_hash[FS_OPT_MAX]; /**< hash maps containing opcode counter for optimizations */
ir_graph *irg; /**< the graph of this object */
entity *ent; /**< the entity of this graph if one exists */
set *address_mark; /**< a set containing the address marks of the nodes */
} opt_entry_t;
/**
- * An entry for a block in a ir-graph
+ * An entry for a block or extended block in a ir-graph
*/
typedef struct _block_entry_t {
counter_t cnt_nodes; /**< the counter of nodes in this block */
long block_nr; /**< block nr */
} block_entry_t;
+/** An entry for an extended block in a ir-graph */
+typedef block_entry_t extbb_entry_t;
+
+/**
+ * Some potential interesting float values
+ */
+typedef enum _float_classify_t {
+ STAT_FC_0, /**< the float value 0.0 */
+ STAT_FC_1, /**< the float value 1.0 */
+ STAT_FC_2, /**< the float value 2.0 */
+ STAT_FC_0_5, /**< the float value 0.5 */
+ STAT_FC_EXACT, /**< an exact value */
+ STAT_FC_OTHER, /**< all other values */
+ STAT_FC_MAX /**< last value */
+} float_classify_t;
+
/**
* constant info
*/
typedef struct _constant_info_t {
- counter_t bits_count[32]; /**< distribution of bit sizes of constants */
- counter_t others; /**< number of other constants */
+ counter_t int_bits_count[32]; /**< distribution of bit sizes of integer constants */
+ counter_t floats[STAT_FC_MAX]; /**< floating point constants */
+ counter_t others; /**< all other constants */
} constant_info_t;
/** forward */
* statistics info
*/
typedef struct _statistic_info_t {
- int stat_options; /**< statistic options: must be first */
- struct obstack cnts; /**< obstack containing the counters */
+ unsigned stat_options; /**< statistic options: field must be first */
+ struct obstack cnts; /**< obstack containing the counters that are incremented */
HASH_MAP(graph_entry_t) *irg_hash; /**< hash map containing the counter for irgs */
HASH_MAP(ir_op) *ir_op_hash; /**< hash map containing all ir_ops (accessible by op_codes) */
pdeq *wait_q; /**< wait queue for leaf call decision */
*/
void stat_init_const_cnt(stat_info_t *status);
+/**
+ * return a human readable name for an float classification
+ */
+const char *stat_fc_name(float_classify_t classification);
+
#endif /* _FIRMSTAT_T_H_ */