-/**
- * Update the extended block counter.
- */
-static void update_extbb_info(ir_node *node, graph_entry_t *graph)
-{
- ir_op *op = get_irn_op(node);
- ir_extblk *extbb;
- extbb_entry_t *eb_entry;
- int i, arity;
-
- /* check for block */
- if (op == op_Block) {
- extbb = get_nodes_extbb(node);
- arity = get_irn_arity(node);
- eb_entry = block_get_entry(&graph->recalc_cnts, get_extbb_node_nr(extbb), graph->extbb_hash);
-
- /* count all incoming edges */
- for (i = 0; i < arity; ++i) {
- ir_node *pred = get_irn_n(node, i);
- ir_extblk *other_extbb = get_nodes_extbb(pred);
-
- if (extbb != other_extbb) {
- extbb_entry_t *eb_entry_other = block_get_entry(&graph->recalc_cnts, get_extbb_node_nr(other_extbb), graph->extbb_hash);
-
- cnt_inc(&eb_entry->cnt[bcnt_in_edges]); /* an edge coming from another extbb */
- cnt_inc(&eb_entry_other->cnt[bcnt_out_edges]);
- } /* if */
- } /* for */
- return;
- } /* if */
-
- extbb = get_nodes_extbb(node);
- eb_entry = block_get_entry(&graph->recalc_cnts, get_extbb_node_nr(extbb), graph->extbb_hash);
-
- if (op == op_Phi && mode_is_datab(get_irn_mode(node))) {
- /* count data Phi per extbb */
- cnt_inc(&eb_entry->cnt[bcnt_phi_data]);
- } /* if */
-
- /* we have a new node in our block */
- cnt_inc(&eb_entry->cnt[bcnt_nodes]);
-
- /* don't count keep-alive edges */
- if (get_irn_op(node) == op_End)
- return;
-
- arity = get_irn_arity(node);
-
- for (i = 0; i < arity; ++i) {
- ir_node *pred = get_irn_n(node, i);
- ir_extblk *other_extbb = get_nodes_extbb(pred);
-
- if (other_extbb == extbb)
- cnt_inc(&eb_entry->cnt[bcnt_edges]); /* a in extbb edge */
- else {
- extbb_entry_t *eb_entry_other = block_get_entry(&graph->recalc_cnts, get_extbb_node_nr(other_extbb), graph->extbb_hash);
-
- cnt_inc(&eb_entry->cnt[bcnt_in_edges]); /* an edge coming from another extbb */
- cnt_inc(&eb_entry_other->cnt[bcnt_out_edges]);
- } /* if */
- } /* for */
-} /* update_extbb_info */
-