summaryrefslogtreecommitdiffhomepage
path: root/ir/stat
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-16 08:38:02 +0200
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-16 08:59:10 +0200
commit8822a309481e7c62b363a4ce787b75bb0977f3c1 (patch)
treea99fc5234375ec624f598ba933cf005e6e1e7a40 /ir/stat
parent1134b42208a421defb0cdcbb9631ea9c95c87724 (diff)
Remove the unused block sched statistics.
Diffstat (limited to 'ir/stat')
-rw-r--r--ir/stat/distrib.c45
-rw-r--r--ir/stat/firmstat.c29
-rw-r--r--ir/stat/firmstat_t.h27
-rw-r--r--ir/stat/stat_dmp.c35
4 files changed, 0 insertions, 136 deletions
diff --git a/ir/stat/distrib.c b/ir/stat/distrib.c
index efee9b9..9b29c1c 100644
--- a/ir/stat/distrib.c
+++ b/ir/stat/distrib.c
@@ -131,25 +131,6 @@ void stat_inc_int_distrib_tbl(distrib_tbl_t *tbl, int key)
}
/*
- * inserts a new object with count 0 into the distribution table
- * if object is already present, nothing happens
- */
-void stat_insert_distrib_tbl(distrib_tbl_t *tbl, const void *object)
-{
- /* executed for side effect */
- (void)distrib_get_entry(tbl, object);
-}
-
-/*
- * inserts a new key with count 0 into the integer distribution table
- * if key is already present, nothing happens
- */
-void stat_insert_int_distrib_tbl(distrib_tbl_t *tbl, int key)
-{
- stat_insert_distrib_tbl(tbl, INT_TO_PTR(key));
-}
-
-/*
* calculates the mean value of a distribution
*/
double stat_calc_mean_distrib_tbl(distrib_tbl_t *tbl)
@@ -189,32 +170,6 @@ double stat_calc_mean_distrib_tbl(distrib_tbl_t *tbl)
return count ? sum / (double)count : 0.0;
}
-/*
- * calculates the average value of a distribution
- */
-double stat_calc_avg_distrib_tbl(distrib_tbl_t *tbl)
-{
- size_t count = 0;
- double sum = 0.0;
-
- if (tbl->int_dist) {
- if (pset_count(tbl->hash_map) <= 0)
- return 0.0;
-
- foreach_pset(tbl->hash_map, distrib_entry_t, entry) {
- sum += cnt_to_dbl(&entry->cnt) * PTR_TO_INT(entry->object);
- count += cnt_to_uint(&entry->cnt);
- }
- } else {
- foreach_pset(tbl->hash_map, distrib_entry_t, entry) {
- sum += cnt_to_dbl(&entry->cnt);
- ++count;
- }
- }
-
- return count ? sum / (double)count : 0.0;
-}
-
/**
* iterates over all entries in a distribution table
*/
diff --git a/ir/stat/firmstat.c b/ir/stat/firmstat.c
index 8b5f5b7..c8f81e7 100644
--- a/ir/stat/firmstat.c
+++ b/ir/stat/firmstat.c
@@ -346,11 +346,7 @@ static void be_block_clear_entry(be_block_entry_t *elem)
if (elem->reg_pressure)
del_pset(elem->reg_pressure);
- if (elem->sched_ready)
- stat_delete_distrib_tbl(elem->sched_ready);
-
elem->reg_pressure = new_pset(reg_pressure_cmp, 5);
- elem->sched_ready = stat_new_int_distrib_tbl();
}
/**
@@ -1704,31 +1700,6 @@ void stat_be_block_regpressure(ir_graph *irg, ir_node *block, int pressure, cons
STAT_LEAVE;
}
-/**
- * Update the distribution of ready nodes of a block
- *
- * @param irg the irg containing the block
- * @param block the block for which the reg pressure should be set
- * @param num_ready the number of ready nodes
- */
-void stat_be_block_sched_ready(ir_graph *irg, ir_node *block, int num_ready)
-{
- if (! status->stat_options)
- return;
-
- STAT_ENTER;
- {
- graph_entry_t *graph = graph_get_entry(irg, status->irg_hash);
- be_block_entry_t *block_ent;
-
- block_ent = be_block_get_entry(&status->be_data, get_irn_node_nr(block), graph->be_block_hash);
-
- /* increase the counter of corresponding number of ready nodes */
- stat_inc_int_distrib_tbl(block_ent->sched_ready, num_ready);
- }
- STAT_LEAVE;
-}
-
/* Dumps a statistics snapshot. */
void stat_dump_snapshot(const char *name, const char *phase)
{
diff --git a/ir/stat/firmstat_t.h b/ir/stat/firmstat_t.h
index 082cf45..b1dbc00 100644
--- a/ir/stat/firmstat_t.h
+++ b/ir/stat/firmstat_t.h
@@ -293,7 +293,6 @@ typedef struct reg_pressure_entry_t {
*/
typedef struct be_block_entry_t {
long block_nr; /**< block nr */
- distrib_tbl_t *sched_ready; /**< distribution of ready nodes per block */
/**< the highest register pressures for this block for each register class */
HASH_MAP(reg_pressure_entry_t) *reg_pressure;
} be_block_entry_t;
@@ -474,27 +473,10 @@ void stat_inc_distrib_tbl(distrib_tbl_t *tbl, const void *object);
void stat_inc_int_distrib_tbl(distrib_tbl_t *tbl, int key);
/**
- * inserts a new object with count 0 into the distribution table
- * if object is already present, nothing happens
- */
-void stat_insert_distrib_tbl(distrib_tbl_t *tbl, const void *object);
-
-/**
- * inserts a new key with count 0 into the integer distribution table
- * if key is already present, nothing happens
- */
-void stat_insert_int_distrib_tbl(distrib_tbl_t *tbl, int key);
-
-/**
* calculates the mean value of a distribution.
*/
double stat_calc_mean_distrib_tbl(distrib_tbl_t *tbl);
-/**
- * calculates the average value of a distribution
- */
-double stat_calc_avg_distrib_tbl(distrib_tbl_t *tbl);
-
/** evaluates each entry of a distribution table. */
typedef void (*eval_distrib_entry_fun)(const distrib_entry_t *entry, void *env);
@@ -536,13 +518,4 @@ const char *stat_fc_name(float_classify_t classification);
*/
void stat_be_block_regpressure(ir_graph *irg, ir_node *block, int pressure, const char *class_name);
-/**
- * Update the distribution of ready nodes of a block
- *
- * @param irg the irg containing the block
- * @param block the block for which the reg pressure should be set
- * @param num_ready the number of ready nodes
- */
-void stat_be_block_sched_ready(ir_graph *irg, ir_node *block, int num_ready);
-
#endif
diff --git a/ir/stat/stat_dmp.c b/ir/stat/stat_dmp.c
index 686a7a2..81cbfe9 100644
--- a/ir/stat/stat_dmp.c
+++ b/ir/stat/stat_dmp.c
@@ -243,38 +243,6 @@ static void simple_dump_be_block_reg_pressure(dumper_t *dmp, graph_entry_t *entr
}
}
-/** prints a distribution entry */
-static void simple_dump_distrib_entry(const distrib_entry_t *entry, void *env)
-{
- dumper_t *dmp = (dumper_t*)env;
- fprintf(dmp->f, "%12u", cnt_to_uint(&entry->cnt));
-}
-
-/**
- * dumps the distribution of the amount of ready nodes for each block
- */
-static void simple_dump_be_block_sched_ready(dumper_t *dmp, graph_entry_t *entry)
-{
- if (pset_count(entry->be_block_hash) > 0) {
- int i;
-
- fprintf(dmp->f, "\nSCHEDULING: NUMBER OF READY NODES\n");
- fprintf(dmp->f, "%12s %12s %12s %12s %12s %12s %12s\n",
- "Block Nr", "1 node", "2 nodes", "3 nodes", "4 nodes", "5 or more", "AVERAGE");
-
- foreach_pset(entry->be_block_hash, be_block_entry_t, b_entry) {
- /* this ensures that all keys from 1 to 5 are in the table */
- for (i = 1; i < 6; ++i)
- stat_insert_int_distrib_tbl(b_entry->sched_ready, i);
-
- fprintf(dmp->f, "BLK %6ld", b_entry->block_nr);
- stat_iterate_distrib_tbl(b_entry->sched_ready, simple_dump_distrib_entry, dmp);
- fprintf(dmp->f, "%12.2lf", stat_calc_avg_distrib_tbl(b_entry->sched_ready));
- fprintf(dmp->f, "\n");
- }
- }
-}
-
/**
* dumps the number of real_function_call optimization
*/
@@ -420,9 +388,6 @@ static void simple_dump_graph(dumper_t *dmp, graph_entry_t *entry)
/* dump block reg pressure */
simple_dump_be_block_reg_pressure(dmp, entry);
-
- /* dump block ready nodes distribution */
- simple_dump_be_block_sched_ready(dmp, entry);
}
}