-/**
- * Collect phi node data
- */
-static void stat_phi_node(be_chordal_env_t *chordal_env, ir_node *phi) {
- int arity, i;
- assert(is_Phi(phi));
-
- /* count all phi phis */
- curr_vals[I_PHI_CNT]++;
-
- /* argument count */
- arity = get_irn_arity(phi);
- curr_vals[I_PHI_ARG_CNT] += arity;
- if (arity > MAX_ARITY)
- curr_vals[I_PHI_ARITY_E]++;
- else
- curr_vals[I_PHI_ARITY_S + arity]++;
-
- /* type of argument {self, const, pred, glob} */
- for (i = 0; i < arity; i++) {
- ir_node *block_of_arg, *block_ith_pred;
- ir_node *cfg_node, *arg = get_irn_n(phi, i);
-
- if (arg == phi) {
- curr_vals[I_PHI_ARG_SELF]++;
- continue;
- }
-
- if (iro_Const == get_irn_opcode(arg)) {
- curr_vals[I_PHI_ARG_CONST]++;
- continue;
- }
-
- block_of_arg = get_nodes_block(arg);
-
- /* get the pred block skipping blocks on critical edges */
- cfg_node = get_irn_n(get_nodes_block(phi), i);
- block_ith_pred = get_nodes_block(cfg_node);
- if (get_irn_opcode(cfg_node) == iro_Jmp && get_irn_arity(block_ith_pred) == 1) {
- /* Then cfg_node_block has exactly 1 pred and 1 succ block,
- * thus it must have been inserted during remove_critical_edges */
- block_ith_pred = get_Block_cfgpred_block(block_ith_pred, 0);
- }
-
- if (block_of_arg == block_ith_pred) {
- curr_vals[I_PHI_ARG_PRED]++;
- continue;
- }
-
- curr_vals[I_PHI_ARG_GLOB]++;