-/**
- * Notify statistic module about amount of ready nodes.
- */
-void be_do_stat_sched_ready(ir_node *block, const ir_nodeset_t *ready_set) {
- if (stat_is_active()) {
- stat_be_block_sched_ready(get_irn_irg(block), block, MIN(ir_nodeset_size(ready_set), 5));
- }
-}
-
-/**
- * Pass information about a perm to the statistic module.
- */
-void be_do_stat_perm(const char *class_name, int n_regs, ir_node *perm, ir_node *block, int n, int real_size) {
- if (stat_is_active()) {
- stat_be_block_stat_perm(class_name, n_regs, perm, block, n, real_size);
- }
-}
-
-/**
- * Pass information about a cycle or chain in a perm to the statistic module.
- */
-void be_do_stat_permcycle(const char *class_name, ir_node *perm, ir_node *block, int is_chain, int n_elems, int n_ops) {
- if (stat_is_active()) {
- stat_be_block_stat_permcycle(class_name, perm, block, is_chain, n_elems, n_ops);
- }
-}
-
-/**
- * Updates nodes statistics.
- */
-static void do_nodes_stat(ir_node *irn, void *env) {
- be_stat_phase_t *phase = env;
- ir_mode *mode;
- ir_opcode opc;
- arch_irn_class_t irn_class;
-
- if (is_Block(irn))
- return;
-
- mode = get_irn_mode(irn);
- opc = get_irn_opcode(irn);
-
- phase->num_nodes++;
-
- /* check for nodes we want to ignore */
- if (be_is_Keep(irn) ||
- be_is_CopyKeep(irn) ||
- opc == iro_Start ||
- opc == iro_End)
- return;
-
- if (is_Proj(irn) && (mode != mode_X)) {
- phase->num_proj++;
- return;
- }
- else if (is_Phi(irn)) {
- phase->num_phi++;
- return;
- }
- else if (mode_is_datab(mode) || ((mode == mode_T) && ! is_be_node(irn)) || (is_Proj(irn) && (mode == mode_X)))
- phase->num_data++;
-
- if (opc == iro_Load)
- phase->num_load++;
- else if (opc == iro_Store)
- phase->num_store++;
-
- irn_class = arch_irn_classify(phase->arch_env, irn);
- if (irn_class & arch_irn_class_spill)
- phase->num_spill++;
- else if (irn_class & arch_irn_class_reload)
- phase->num_reload++;
- else if (irn_class & arch_irn_class_stackparam)
- phase->num_load++;
- else if (irn_class & arch_irn_class_load)
- phase->num_load++;
- else if (irn_class & arch_irn_class_store)
- phase->num_store++;
-}