ir_print_visitor: print the type of expressions.

This can be useful for debugging - it allows us to see that the inferred
type is what we think it should be.  Furthermore, it will allow the IR
reader to avoid complex, operator-specific type inference.
This commit is contained in:
Kenneth Graunke 2010-04-07 16:36:32 -07:00 committed by Ian Romanick
parent 295bb7ff8d
commit 1a3a096bf5

View file

@ -148,10 +148,13 @@ void ir_print_visitor::visit(ir_expression *ir)
printf("(expression ");
print_type(ir->type);
assert((unsigned int)ir->operation <
sizeof(operators) / sizeof(operators[0]));
printf("%s", operators[ir->operation]);
printf(" %s ", operators[ir->operation]);
printf("(");
if (ir->operands[0])
ir->operands[0]->accept(this);