X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firvrfy.c;h=9a3cebdc20bfddd15f9b97f8e5ea3b5e35342440;hb=e3e22fa6f927847099c0bff62457003aa81f2518;hp=74e0ee785a55dd068de95e841ee7bc965fca1cc3;hpb=2faa3bd7c1c63d2f28380f3b0771844034499f73;p=libfirm diff --git a/ir/ir/irvrfy.c b/ir/ir/irvrfy.c index 74e0ee785..9a3cebdc2 100644 --- a/ir/ir/irvrfy.c +++ b/ir/ir/irvrfy.c @@ -3,9 +3,15 @@ ** ** Authors: Christian Schaefer ** -x** +** */ +/* $Id$ */ + +#ifdef HAVE_CONFIG_H +# include +#endif + # include "irgraph_t.h" # include "irvrfy.h" # include "irgwalk.h" @@ -23,6 +29,12 @@ irn_vrfy (ir_node *n) ir_node **in; opcode = get_irn_opcode (n); + + if (opcode != iro_Phi && opcode != iro_Block) + for (i = 0; i < get_irn_arity(n); i++) + if (get_irn_opcode(get_irn_n(n, i)) == iro_Bad) + return; + mymode = get_irn_mode (n); in = get_irn_in (n); @@ -52,8 +64,8 @@ irn_vrfy (ir_node *n) break; case iro_Return: op1mode = get_irn_mode(in[1]); - /* Return: BB x M x data1 x ... x datan --> X */ - //printf("mode: %s, code %s\n", ID_TO_STR(n->mode->name), ID_TO_STR(n->op->name)); + /* Return: BB x M x data1 x ... x datan --> X */ + /* printf("mode: %s, code %s\n", ID_TO_STR(n->mode->name), ID_TO_STR(n->op->name));*/ assert ( op1mode == mode_M ); /* operand M */ for (i=2; i < get_irn_arity(n); i++) { assert ( mode_is_data(get_irn_mode(in[i])) ); /* operand datai */ @@ -331,5 +343,11 @@ vrfy_wrap (ir_node *node, void *env) { void irg_vrfy (ir_graph *irg) { + ir_graph *rem; + rem = current_ir_graph; + current_ir_graph = irg; + irg_walk(irg->end, vrfy_wrap, NULL, NULL); + + current_ir_graph = rem; }