const struct glsl_type *type;
class ir_constant *constant_expression_value();
+
+ /** ir_print_visitor helper for debugging. */
+ void print(void);
+
virtual void accept(ir_visitor *) = 0;
virtual ir_visitor_status accept(ir_hierarchical_visitor *) = 0;
*/
#include "ir.h"
-#include "ir_print_visitor.h"
#include "ir_visitor.h"
#include "ir_optimization.h"
#include "glsl_types.h"
#include "ir.h"
#include "ir_visitor.h"
-#include "ir_print_visitor.h"
#include "ir_basic_block.h"
#include "ir_optimization.h"
#include "glsl_types.h"
*/
#include "ir.h"
-#include "ir_print_visitor.h"
#include "ir_basic_block.h"
#include "ir_optimization.h"
#include "glsl_types.h"
ir_assignment *ir_assign = ir->as_assignment();
if (debug) {
- ir_print_visitor v;
- ir->accept(&v);
+ ir->print();
printf("\n");
}
static void print_type(const glsl_type *t);
+void
+ir_instruction::print(void)
+{
+ ir_print_visitor v;
+ accept(&v);
+}
+
void
_mesa_print_ir(exec_list *instructions,
struct _mesa_glsl_parse_state *state)
printf("(\n");
foreach_iter(exec_list_iterator, iter, *instructions) {
- ir_print_visitor v;
-
- ((ir_instruction *)iter.get())->accept(& v);
+ ((ir_instruction *)iter.get())->print();
printf("\n");
}
printf("\n)");
#include "ir.h"
#include "ir_visitor.h"
#include "ir_optimization.h"
-#include "ir_print_visitor.h"
#include "glsl_types.h"
/**