**
** Authors: Christian Schaefer
**
-**
+x**
*/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+# include "irgraph_t.h"
# include "irvrfy.h"
# include "irgwalk.h"
void
-ir_vrfy (ir_node *n)
+irn_vrfy (ir_node *n)
{
int i;
int opcode;
mymode = get_irn_mode (n);
in = get_irn_in (n);
-// IR_OP_VRFY (opcode);
-// IR_MODE_VRFY (mymode);
-
switch (opcode) {
case iro_Start:
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 */
);
op_is_symmetric = 2;
break;
- case iro_DivMod:
+ case iro_DivMod:;
op1mode = get_irn_mode(in[1]);
op2mode = get_irn_mode(in[2]);
op3mode = get_irn_mode(in[3]);
/* Phi: BB x dataM^n --> dataM */
/* for some reason "<=" aborts. Is there a problem with get_store? */
for (i=1; i < get_irn_arity(n); i++) {
- assert ( get_irn_mode(in[i]) == mymode );
+ if (!is_Bad(in[i]))
+ assert ( get_irn_mode(in[i]) == mymode );
};
assert ( mode_is_dataM(mymode) );
break;
void
vrfy_wrap (ir_node *node, void *env) {
- ir_vrfy(node);
+ irn_vrfy(node);
}
void
-vrfy_graph (ir_graph *irg)
+irg_vrfy (ir_graph *irg)
{
irg_walk(irg->end, vrfy_wrap, NULL, NULL);
}