X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fgraph.c;h=0b123e50cf686664138ce21ffb0faa23c1e549c1;hb=b8285f3c9951354be07f693dd5996790d5764e3a;hp=95e1fff2bb42a59abeb32870870b8c718163494f;hpb=23a69556ded315d102337bf13971411188e26bcd;p=mono.git diff --git a/mono/mini/graph.c b/mono/mini/graph.c index 95e1fff2bb4..0b123e50cf6 100644 --- a/mono/mini/graph.c +++ b/mono/mini/graph.c @@ -155,121 +155,6 @@ mono_draw_cfg (MonoCompile *cfg, FILE *fp) fprintf (fp, "}\n"); } -#if 0 - -static void -mono_print_label (FILE *fp, MonoInst *tree) { - int arity; - - if (!tree) - return; - - arity = mono_burg_arity [tree->opcode]; - - fprintf (fp, "\\ %s%s", arity? "(": "", mono_inst_name (tree->opcode)); - - switch (tree->opcode) { - case OP_ICONST: - fprintf (fp, "[%ld]", (long)tree->inst_c0); - break; - case OP_I8CONST: - fprintf (fp, "[%lld]", (long long)tree->inst_l); - break; - case OP_R8CONST: - fprintf (fp, "[%f]", *(double*)tree->inst_p0); - break; - case OP_R4CONST: - fprintf (fp, "[%f]", *(float*)tree->inst_p0); - break; - case OP_ARG: - case OP_LOCAL: - fprintf (fp, "[%d]", (int)tree->inst_c0); - break; - case OP_REGOFFSET: - fprintf (fp, "[0x%x(%s)]", (int)tree->inst_offset, mono_arch_regname (tree->inst_basereg)); - break; - case OP_REGVAR: - fprintf (fp, "[%s]", mono_arch_regname (tree->dreg)); - break; - case CEE_NEWARR: - fprintf (fp, "[%s]", tree->inst_newa_class->name); - mono_print_label (fp, tree->inst_newa_len); - break; - case OP_CALL: - case OP_CALL_MEMBASE: - case OP_FCALL: - case OP_FCALL_MEMBASE: - case OP_LCALL: - case OP_LCALL_MEMBASE: - case OP_VCALL: - case OP_VCALL_MEMBASE: - case OP_VOIDCALL: - case OP_VOIDCALL_MEMBASE: { - MonoCallInst *call = (MonoCallInst*)tree; - if (call->method) { - if (mono_method_signature (call->method)->hasthis && tree->inst_left) { - mono_print_label (fp, tree->inst_left); - } - fprintf (fp, "[%s]", call->method->name); - } - break; - } - case OP_PHI: { - int i; - fprintf (fp, "[%d\\ (", (int)tree->inst_c0); - for (i = 0; i < tree->inst_phi_args [0]; i++) { - if (i) - fprintf (fp, ",\\ "); - fprintf (fp, "%d", tree->inst_phi_args [i + 1]); - } - fprintf (fp, ")]"); - break; - } - case OP_NOP: - case OP_JMP: - case OP_BREAK: - break; - case OP_BR: - fprintf (fp, "[B%d]", tree->inst_target_bb->block_num); - break; - case OP_SWITCH: - case CEE_ISINST: - case CEE_CASTCLASS: - case OP_CALL_REG: - case OP_FCALL_REG: - case OP_LCALL_REG: - case OP_VCALL_REG: - case OP_VOIDCALL_REG: - mono_print_label (fp, tree->inst_left); - break; - case CEE_BNE_UN: - case CEE_BEQ: - case CEE_BLT: - case CEE_BLT_UN: - case CEE_BGT: - case CEE_BGT_UN: - case CEE_BGE: - case CEE_BGE_UN: - case CEE_BLE: - case CEE_BLE_UN: - fprintf (fp, "[B%dB%d]", tree->inst_true_bb->block_num, tree->inst_false_bb->block_num); - mono_print_label (fp, tree->inst_left); - break; - default: - if (arity) { - mono_print_label (fp, tree->inst_left); - if (arity > 1) - mono_print_label (fp, tree->inst_right); - } - break; - } - - if (arity) - fprintf (fp, ")"); -} - -#endif - static void mono_draw_code_cfg (MonoCompile *cfg, FILE *fp) {