X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firdump_grgen.c;h=909db21b52898cf127ba40e6c2ad56eec7e94030;hb=26baaebd4406b34b8b04ef441d4e45e23c10a747;hp=286fb80998ce3e6cd4cda5583e5818f0f12fe42d;hpb=782d7aa841e755c47b68c15a5bc48bd0bdb4769c;p=libfirm diff --git a/ir/ir/irdump_grgen.c b/ir/ir/irdump_grgen.c index 286fb8099..909db21b5 100644 --- a/ir/ir/irdump_grgen.c +++ b/ir/ir/irdump_grgen.c @@ -42,6 +42,7 @@ #include "tv.h" #include "irgwalk.h" #include "firm_types.h" +#include "irdump_grgen.h" typedef struct @@ -253,7 +254,7 @@ static int dump_pattern(grgen_dumpinfo_t *dump_info, FILE *fp) int i; // Dump edges - for(i = -1; i < get_irn_arity(n); i++) + for(i = is_Block(n) ? 0 : -1; i < get_irn_arity(n); i++) dump_grg_egde(n, i, dump_info, fp); } @@ -390,7 +391,7 @@ static void dump_grgen_mode(ir_node *n, grgen_dumpinfo_t *dump_info, FILE *fp, i static char *dump_grgen_mode_node(ir_mode *irn_mode, grgen_dumpinfo_t *dump_info, FILE *fp) { - modecode mode_code = get_mode_modecode(irn_mode); + ir_modecode mode_code = get_mode_modecode(irn_mode); const char *mode_name = get_mode_name(irn_mode); char *mode_node_name; @@ -463,7 +464,7 @@ static void dump_grgen_eval(ir_node *n, grgen_dumpinfo_t *dump_info, FILE *fp) // Correlate the matched phi edges with the matched block edges // Caution: Position 0 in the edge_names array is the block edge, so start at 1 - for(i = 0; i < get_irn_arity(n) + 1; i++) + for(i = code == iro_Block; i < get_irn_arity(n) + 1; i++) { assert(edge_names[i] != NULL && "Some edges have not been dumped!");