From 31c36223c4e5cdf36a74716967bb79c45c081de4 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Fri, 28 Apr 2006 15:48:18 +0000 Subject: [PATCH] don't create extended block info for const code irg [r7668] --- ir/stat/firmstat.c | 16 +++++++++------- ir/stat/stat_dmp.c | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ir/stat/firmstat.c b/ir/stat/firmstat.c index 7eb90471f..5116496a6 100644 --- a/ir/stat/firmstat.c +++ b/ir/stat/firmstat.c @@ -863,7 +863,8 @@ static void update_node_stat(ir_node *node, void *env) /* 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 */ @@ -1006,16 +1007,17 @@ static void update_graph_stat(graph_entry_t *global, graph_entry_t *graph) 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 */ diff --git a/ir/stat/stat_dmp.c b/ir/stat/stat_dmp.c index 809fba0e9..70b72b135 100644 --- a/ir/stat/stat_dmp.c +++ b/ir/stat/stat_dmp.c @@ -455,7 +455,7 @@ static void simple_dump_graph(dumper_t *dmp, graph_entry_t *entry) /* dump block permutation statistics */ simple_dump_be_block_permstat(dmp, entry); - if (dmp->status->stat_options & FIRMSTAT_COUNT_EXTBB) { + if (dmp->status->stat_options & FIRMSTAT_COUNT_EXTBB && entry->extbb_hash) { /* dump extended block info */ fprintf(dmp->f, "\n%12s %12s %12s %12s %12s %12s %12s\n", "Extbb Nr", "Nodes", "intern E", "incoming E", "outgoing E", "Phi", "quot"); foreach_pset(entry->extbb_hash, eb_entry) { -- 2.20.1