-
- if (op == op_Phi && get_irn_arity(node) == 0) {
- /* special case, a Phi0 node, count on extra counter */
- op = status->op_Phi0 ? status->op_Phi0 : op;
- } else if (op == op_Phi && get_irn_mode(node) == mode_M) {
- /* special case, a Memory Phi node, count on extra counter */
- op = status->op_PhiM ? status->op_PhiM : op;
- } else if (op == op_Proj && get_irn_mode(node) == mode_M) {
- /* special case, a Memory Proj node, count on extra counter */
- op = status->op_ProjM ? status->op_ProjM : op;
- } else if (op == op_Mul &&
- (get_irn_op(get_Mul_left(node)) == op_Const || get_irn_op(get_Mul_right(node)) == op_Const)) {
- /* special case, a Multiply by a const, count on extra counter */
- op = status->op_MulC ? status->op_MulC : op;
- } else if (op == op_Div && get_irn_op(get_Div_right(node)) == op_Const) {
- /* special case, a division by a const, count on extra counter */
- op = status->op_DivC ? status->op_DivC : op;
- } else if (op == op_Mod && get_irn_op(get_Mod_right(node)) == op_Const) {
- /* special case, a module by a const, count on extra counter */
- op = status->op_ModC ? status->op_ModC : op;
- } else if (op == op_DivMod && get_irn_op(get_DivMod_right(node)) == op_Const) {
- /* special case, a division/modulo by a const, count on extra counter */
- op = status->op_DivModC ? status->op_DivModC : op;
- } else if (op == op_Sel && get_irn_op(get_Sel_ptr(node)) == op_Sel) {
- /* special case, a Sel of a Sel, count on extra counter */
- op = status->op_SelSel ? status->op_SelSel : op;
-
- if (get_irn_op(get_Sel_ptr(get_Sel_ptr(node))) == op_Sel) {
- /* special case, a Sel of a Sel of a Sel, count on extra counter */
- op = status->op_SelSelSel ? status->op_SelSelSel : op;
+ ir_opcode opc = op->code;
+
+ switch (opc) {
+ case iro_Phi:
+ if (get_irn_arity(node) == 0) {
+ /* special case, a Phi0 node, count on extra counter */
+ op = status->op_Phi0 ? status->op_Phi0 : op;
+ } else if (get_irn_mode(node) == mode_M) {
+ /* special case, a Memory Phi node, count on extra counter */
+ op = status->op_PhiM ? status->op_PhiM : op;