added scheduling statistics for number of ready nodes
authorChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Sat, 8 Apr 2006 21:04:31 +0000 (21:04 +0000)
committerChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Sat, 8 Apr 2006 21:04:31 +0000 (21:04 +0000)
ir/be/Makefile.in
ir/be/belistsched.c
ir/be/bemain.c
ir/be/bestat.c
ir/be/bestat.h

index 560f62b..678d252 100644 (file)
@@ -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
index 98e028c..22ce802 100644 (file)
@@ -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);
 
index 5c6ffe1..e94710e 100644 (file)
@@ -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) */
index 1a238f1..030d8cf 100644 (file)
@@ -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));
+}
index cb01787..f6041f0 100644 (file)
@@ -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_ */