/* count extended block edges */
if (status->stat_options & FIRMSTAT_COUNT_EXTBB) {
- undate_extbb_info(node, graph);
+ if (graph->irg != get_const_code_irg())
+ undate_extbb_info(node, graph);
}
/* handle statistics for special node types */
graph->block_hash = new_pset(block_cmp, 5);
/* we need dominator info */
- if (graph->irg != get_const_code_irg())
+ if (graph->irg != get_const_code_irg()) {
if (get_irg_dom_state(graph->irg) != dom_consistent)
compute_doms(graph->irg);
- if (status->stat_options & FIRMSTAT_COUNT_EXTBB) {
- /* we need extended basic blocks */
- compute_extbb(graph->irg);
+ if (status->stat_options & FIRMSTAT_COUNT_EXTBB) {
+ /* we need extended basic blocks */
+ compute_extbb(graph->irg);
- /* create new extbb counter */
- graph->extbb_hash = new_pset(block_cmp, 5);
+ /* create new extbb counter */
+ graph->extbb_hash = new_pset(block_cmp, 5);
+ }
}
/* count the nodes in the graph */
}
}
+/* returns 1 if statistics were initialized, 0 otherwise */
+int stat_is_active(void) {
+ return status != (stat_info_t *)&status_disable;
+}
+
#else
/* initialize the statistics module. */