Commit 49f0621a authored by Christian Würdig's avatar Christian Würdig
Browse files

added scheduling statistics for number of ready nodes

parent 21ae21f5
......@@ -28,7 +28,8 @@ SOURCES += Makefile.in besched.h belistsched.h belistsched.c \
bechordal_draw.h beirgmod.c beirgmod.h benode.c benode_t.h \
bessadestr.c beifg_std.c bespill.c bespillbelady.c bespillilp.c beuses.c \
belower.c belower.h beraextern.c beabi.c beabi.h beabi_t.h \
benodesets.c benodesets.h bemachnode.c bemachnode.h beinsn.c
benodesets.c benodesets.h bemachnode.c bemachnode.h beinsn.c \
bestat.h bestat.c
include $(topdir)/MakeRules
......
......@@ -33,6 +33,7 @@
#include "belive_t.h"
#include "belistsched.h"
#include "bearch.h"
#include "bestat.h"
#define MAX(x,y) ((x) > (y) ? (x) : (y))
#define MIN(x,y) ((x) < (y) ? (x) : (y))
......@@ -689,6 +690,9 @@ static void list_sched_block(ir_node *block, void *env_ptr)
be.curr_time += phi_seen;
while (nodeset_count(be.ready_set) > 0) {
/* collect statitics about amount of ready nodes */
be_do_stat_sched_ready(block, be.ready_set);
/* select a node to be scheduled and check if it was ready */
irn = select_node(&be);
......
......@@ -316,7 +316,7 @@ static void be_main_loop(FILE *file_handle)
* Note that this requires disabling the edges here.
*/
edges_deactivate(irg);
dead_node_elimination(irg);
//dead_node_elimination(irg);
edges_activate(irg);
/* Compute loop nesting information (for weighting copies) */
......
......@@ -44,3 +44,10 @@ void be_do_stat_reg_pressure(be_irg_t *birg) {
/* Collect register pressure information for each block */
irg_block_walk_graph(birg->irg, stat_reg_pressure_block, NULL, birg);
}
/**
* Notify statistic module about amount of ready nodes.
*/
void be_do_stat_sched_ready(ir_node *block, nodeset *ready_set) {
hook_be_block_sched_ready(block, get_irn_irg(block), nodeset_count(ready_set));
}
......@@ -2,6 +2,7 @@
#define _BESTAT_H_
#include "be_t.h"
#include "benodesets.h"
/**
* Collects statistics information about register pressure.
......@@ -9,4 +10,11 @@
*/
void be_do_stat_reg_pressure(be_irg_t *birg);
/**
* Collect statistics about amount of redy nodes per block
* @param block The block
* @param ready_set A set of ready nodes
*/
void be_do_stat_sched_ready(ir_node *block, nodeset *ready_set);
#endif /* _BESTAT_H_ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment