Lines Matching refs:ir

31  * in the ir tree.  ir_variable does appear multiple times: Once as a
36 #include "ir.h"
64 virtual ir_visitor_status visit(ir_dereference_variable *ir);
66 virtual ir_visitor_status visit_enter(ir_discard *ir);
67 virtual ir_visitor_status visit_enter(ir_if *ir);
69 virtual ir_visitor_status visit_enter(ir_function *ir);
70 virtual ir_visitor_status visit_leave(ir_function *ir);
71 virtual ir_visitor_status visit_enter(ir_function_signature *ir);
72 virtual ir_visitor_status visit_enter(ir_return *ir);
74 virtual ir_visitor_status visit_leave(ir_expression *ir);
75 virtual ir_visitor_status visit_leave(ir_swizzle *ir);
80 virtual ir_visitor_status visit_enter(ir_assignment *ir);
81 virtual ir_visitor_status visit_enter(ir_call *ir);
83 static void validate_ir(ir_instruction *ir, void *data);
93 ir_validate::visit(ir_dereference_variable *ir)
95 if ((ir->var == NULL) || (ir->var->as_variable() == NULL)) {
97 (void *) ir, (void *) ir->var);
104 if (ir->var->type->without_array() != ir->type->without_array()) {
106 ir->print();
111 if (_mesa_set_search(ir_set, ir->var) == NULL) {
114 (void *) ir, ir->var->name, (void *) ir->var);
118 this->validate_ir(ir, this->data_enter);
124 ir_validate::visit_enter(class ir_dereference_array *ir)
126 if (!ir->array->type->is_array() && !ir->array->type->is_matrix() &&
127 !ir->array->type->is_vector()) {
130 (void *) ir);
131 ir->print();
136 if (ir->array->type->is_array()) {
137 if (ir->array->type->fields.array != ir->type) {
140 ir->print();
144 } else if (ir->array->type->base_type != ir->type->base_type) {
146 ir->print();
151 if (!ir->array_index->type->is_scalar()) {
153 (void *) ir, ir->array_index->type->name);
157 if (!ir->array_index->type->is_integer_16_32()) {
159 (void *) ir, ir->array_index->type->name);
167 ir_validate::visit_enter(class ir_dereference_record *ir)
169 if (!ir->record->type->is_struct() && !ir->record->type->is_interface()) {
171 (void *) ir);
172 ir->print();
177 if (ir->record->type->fields.structure[ir->field_idx].type != ir->type) {
180 ir->print();
189 ir_validate::visit_enter(ir_discard *ir)
191 if (ir->condition && ir->condition->type != glsl_type::bool_type) {
193 ir->condition->type->name);
194 ir->print();
203 ir_validate::visit_enter(ir_if *ir)
205 if (ir->condition->type != glsl_type::bool_type) {
207 ir->condition->type->name);
208 ir->print();
218 ir_validate::visit_enter(ir_function *ir)
226 ir->name, (void *) ir,
235 this->current_function = ir;
237 this->validate_ir(ir, this->data_enter);
242 foreach_in_list(ir_instruction, sig, &ir->signatures) {
245 ir->name);
254 ir_validate::visit_leave(ir_function *ir)
256 assert(ralloc_parent(ir->name) == ir);
263 ir_validate::visit_enter(ir_function_signature *ir)
265 if (this->current_function != ir->function()) {
269 (void *) ir,
271 ir->function_name(), (void *) ir->function());
275 if (ir->return_type == NULL) {
277 (void *) ir, ir->function_name());
281 this->validate_ir(ir, this->data_enter);
287 ir_validate::visit_enter(ir_return *ir)
298 ir_validate::visit_leave(ir_expression *ir)
300 for (unsigned i = ir->num_operands; i < 4; i++) {
301 assert(ir->operands[i] == NULL);
304 for (unsigned i = 0; i < ir->num_operands; i++) {
305 assert(ir->operands[i] != NULL);
308 switch (ir->operation) {
310 assert(ir->operands[0]->type == ir->type);
313 assert(ir->type->is_boolean());
314 assert(ir->operands[0]->type->is_boolean());
318 assert(ir->type == ir->operands[0]->type);
323 assert(ir->operands[0]->type->is_int_16_32_64() ||
324 ir->operands[0]->type->is_float_16_32_64());
325 assert(ir->type == ir->operands[0]->type);
331 assert(ir->type->is_float_16_32_64());
332 assert(ir->type == ir->operands[0]->type);
340 assert(ir->operands[0]->type->is_float_16_32());
341 assert(ir->type == ir->operands[0]->type);
345 assert(ir->operands[0]->type->is_float_16_32());
346 assert(ir->type->is_int_16_32());
349 assert(ir->operands[0]->type->is_float_16_32());
350 assert(ir->type->is_uint_16_32());
353 assert(ir->operands[0]->type->is_int_16_32());
354 assert(ir->type->is_float_16_32());
357 assert(ir->operands[0]->type->is_float_16_32());
358 assert(ir->type->is_boolean());
361 assert(ir->operands[0]->type->base_type ==
363 assert(ir->type->is_boolean());
366 assert(ir->operands[0]->type->is_boolean());
367 assert(ir->type->is_float_16_32());
370 assert(ir->operands[0]->type->is_boolean());
371 assert(ir->type->base_type == GLSL_TYPE_FLOAT16);
374 assert(ir->operands[0]->type->is_int_16_32());
375 assert(ir->type->is_boolean());
378 assert(ir->operands[0]->type->is_boolean());
379 assert(ir->type->is_int_16_32());
382 assert(ir->operands[0]->type->is_uint_16_32());
383 assert(ir->type->is_float_16_32());
386 assert(ir->operands[0]->type->is_int_16_32());
387 assert(ir->type->is_uint_16_32());
390 assert(ir->operands[0]->type->is_uint_16_32());
391 assert(ir->type->is_int_16_32());
394 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT);
395 assert(ir->type->base_type == GLSL_TYPE_FLOAT);
398 assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
399 assert(ir->type->base_type == GLSL_TYPE_INT);
402 assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT);
403 assert(ir->type->base_type == GLSL_TYPE_FLOAT);
406 assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
407 assert(ir->type->base_type == GLSL_TYPE_UINT);
411 assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT64);
412 assert(ir->type->is_double());
415 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT64);
416 assert(ir->type->is_double());
419 assert(ir->operands[0]->type->is_double());
420 assert(ir->type->base_type == GLSL_TYPE_UINT64);
423 assert(ir->operands[0]->type->is_double());
424 assert(ir->type->base_type == GLSL_TYPE_INT64);
427 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT64);
428 assert(ir->type->is_int_16_32());
431 assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT64);
432 assert(ir->type->is_int_16_32());
435 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT64);
436 assert(ir->type->is_uint_16_32());
439 assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT64);
440 assert(ir->type->is_uint_16_32());
443 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT64);
444 assert(ir->type->is_boolean());
447 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT64);
448 assert(ir->type->is_float());
451 assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT64);
452 assert(ir->type->is_float());
455 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT64);
456 assert(ir->type->is_double());
459 assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT64);
460 assert(ir->type->is_double());
463 assert(ir->operands[0]->type->is_int_16_32());
464 assert(ir->type->base_type == GLSL_TYPE_INT64);
467 assert(ir->operands[0]->type->is_uint_16_32());
468 assert(ir->type->base_type == GLSL_TYPE_INT64);
471 assert(ir->operands[0]->type->is_boolean());
472 assert(ir->type->base_type == GLSL_TYPE_INT64);
475 assert(ir->operands[0]->type->is_float());
476 assert(ir->type->base_type == GLSL_TYPE_INT64);
479 assert(ir->operands[0]->type->is_double());
480 assert(ir->type->base_type == GLSL_TYPE_INT64);
483 assert(ir->operands[0]->type->is_int_16_32());
484 assert(ir->type->base_type == GLSL_TYPE_UINT64);
487 assert(ir->operands[0]->type->is_uint_16_32());
488 assert(ir->type->base_type == GLSL_TYPE_UINT64);
491 assert(ir->operands[0]->type->is_float());
492 assert(ir->type->base_type == GLSL_TYPE_UINT64);
495 assert(ir->operands[0]->type->is_double());
496 assert(ir->type->base_type == GLSL_TYPE_UINT64);
499 assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT64);
500 assert(ir->type->base_type == GLSL_TYPE_INT64);
503 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT64);
504 assert(ir->type->base_type == GLSL_TYPE_UINT64);
511 assert(ir->operands[0]->type->is_float_16_32_64());
512 assert(ir->operands[0]->type == ir->type);
522 assert(ir->operands[0]->type->is_float_16_32());
523 assert(ir->operands[0]->type == ir->type);
529 assert(ir->type == glsl_type::uint_type);
530 assert(ir->operands[0]->type == glsl_type::vec2_type);
535 assert(ir->type == glsl_type::uint_type);
536 assert(ir->operands[0]->type == glsl_type::vec4_type);
540 assert(ir->type == glsl_type::double_type);
541 assert(ir->operands[0]->type == glsl_type::uvec2_type);
545 assert(ir->type == glsl_type::int64_t_type);
546 assert(ir->operands[0]->type == glsl_type::ivec2_type);
550 assert(ir->type == glsl_type::uint64_t_type);
551 assert(ir->operands[0]->type == glsl_type::uvec2_type);
555 assert(ir->type->is_sampler());
556 assert(ir->operands[0]->type == glsl_type::uvec2_type);
560 assert(ir->type->is_image());
561 assert(ir->operands[0]->type == glsl_type::uvec2_type);
567 assert(ir->type == glsl_type::vec2_type);
568 assert(ir->operands[0]->type == glsl_type::uint_type);
573 assert(ir->type == glsl_type::vec4_type);
574 assert(ir->operands[0]->type == glsl_type::uint_type);
578 assert(ir->type == glsl_type::uvec2_type);
579 assert(ir->operands[0]->type == glsl_type::double_type);
583 assert(ir->type == glsl_type::ivec2_type);
584 assert(ir->operands[0]->type == glsl_type::int64_t_type);
588 assert(ir->type == glsl_type::uvec2_type);
589 assert(ir->operands[0]->type == glsl_type::uint64_t_type);
593 assert(ir->type == glsl_type::uvec2_type);
594 assert(ir->operands[0]->type->is_sampler());
598 assert(ir->type == glsl_type::uvec2_type);
599 assert(ir->operands[0]->type->is_image());
603 assert(ir->operands[0]->type == ir->type);
604 assert(ir->type->is_integer_32());
610 assert(ir->operands[0]->type->vector_elements == ir->type->vector_elements);
611 assert(ir->operands[0]->type->is_integer_16_32());
612 assert(ir->type->is_int_16_32());
616 assert(ir->operands[0]->type == ir->type);
617 assert(ir->type->is_uint_16_32());
621 assert(ir->operands[0]->type == ir->type);
622 assert(ir->operands[0]->type->is_float_16_32());
626 assert(ir->type == glsl_type::int_type);
627 assert(ir->operands[0]->type == glsl_type::uint_type);
631 assert(ir->type == glsl_type::int_type);
632 assert(ir->operands[0]->type->is_array());
633 assert(ir->operands[0]->type->is_unsized_array());
637 assert(ir->type == glsl_type::int_type);
638 assert(ir->operands[0]->type->is_array());
642 assert(ir->operands[0]->type->is_double());
643 assert(ir->type->is_float());
646 assert(ir->operands[0]->type->is_float());
647 assert(ir->type->is_double());
650 assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT16);
651 assert(ir->type->is_float());
655 assert(ir->operands[0]->type->is_float());
656 assert(ir->type->base_type == GLSL_TYPE_FLOAT16);
659 assert(ir->operands[0]->type->is_int_16_32());
660 assert(ir->type->is_int_16_32());
661 assert(ir->type->base_type != ir->operands[0]->type->base_type);
664 assert(ir->operands[0]->type->is_uint_16_32());
665 assert(ir->type->is_uint_16_32());
666 assert(ir->type->base_type != ir->operands[0]->type->base_type);
669 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT);
670 assert(ir->type->base_type == GLSL_TYPE_INT16);
673 assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT);
674 assert(ir->type->base_type == GLSL_TYPE_UINT16);
677 assert(ir->operands[0]->type->is_double());
678 assert(ir->type->is_int_16_32());
681 assert(ir->operands[0]->type->is_int_16_32());
682 assert(ir->type->is_double());
685 assert(ir->operands[0]->type->is_double());
686 assert(ir->type->is_uint_16_32());
689 assert(ir->operands[0]->type->is_uint_16_32());
690 assert(ir->type->is_double());
693 assert(ir->operands[0]->type->is_double());
694 assert(ir->type->is_boolean());
698 assert(ir->operands[0]->type->is_float_32_64());
699 assert(ir->type->is_double());
702 assert(ir->operands[0]->type->is_float_32_64());
703 assert(ir->type->base_type == GLSL_TYPE_INT);
706 assert(ir->operands[0]->type->base_type == GLSL_TYPE_SUBROUTINE);
707 assert(ir->type->base_type == GLSL_TYPE_INT);
711 assert(ir->operands[0]->type->is_float_16_32_64());
712 assert(ir->type == ir->operands[0]->type);
723 assert(ir->operands[0]->type->base_type ==
724 ir->operands[1]->type->base_type);
726 if (ir->operation == ir_binop_mul &&
727 (ir->type->base_type == GLSL_TYPE_UINT64 ||
728 ir->type->base_type == GLSL_TYPE_INT64) &&
729 (ir->operands[0]->type->is_int_16_32()||
730 ir->operands[1]->type->is_int_16_32()||
731 ir->operands[0]->type->is_uint_16_32() ||
732 ir->operands[1]->type->is_uint_16_32())) {
733 assert(ir->operands[0]->type == ir->operands[1]->type);
737 if (ir->operands[0]->type->is_scalar())
738 assert(ir->operands[1]->type == ir->type);
739 else if (ir->operands[1]->type->is_scalar())
740 assert(ir->operands[0]->type == ir->type);
741 else if (ir->operands[0]->type->is_vector() &&
742 ir->operands[1]->type->is_vector()) {
743 assert(ir->operands[0]->type == ir->operands[1]->type);
744 assert(ir->operands[0]->type == ir->type);
749 assert(ir->operands[0]->type == ir->operands[1]->type);
750 assert(ir->operands[0]->type->is_integer_16_32_64());
751 assert(ir->operands[0]->type->vector_elements ==
752 ir->type->vector_elements);
753 assert(ir->type->is_uint_16_32_64());
760 assert(ir->type == ir->operands[0]->type);
761 assert(ir->type == ir->operands[1]->type);
762 assert(ir->type->is_integer_16_32_64());
767 assert(ir->type == ir->operands[0]->type);
768 assert(ir->type == ir->operands[1]->type);
769 assert(ir->type->is_integer_32());
774 assert(ir->type == ir->operands[0]->type);
775 assert(ir->type == ir->operands[1]->type);
776 assert(ir->type->base_type == GLSL_TYPE_UINT);
788 assert(ir->type->is_boolean());
789 assert(ir->operands[0]->type == ir->operands[1]->type);
790 assert(ir->operands[0]->type->is_vector()
791 || ir->operands[0]->type->is_scalar());
792 assert(ir->operands[0]->type->vector_elements
793 == ir->type->vector_elements);
801 assert(ir->type == glsl_type::bool_type);
802 assert(ir->operands[0]->type == ir->operands[1]->type);
807 assert(ir->operands[0]->type->is_integer_16_32_64() &&
808 ir->operands[1]->type->is_integer_16_32());
809 if (ir->operands[0]->type->is_scalar()) {
810 assert(ir->operands[1]->type->is_scalar());
812 if (ir->operands[0]->type->is_vector() &&
813 ir->operands[1]->type->is_vector()) {
814 assert(ir->operands[0]->type->components() ==
815 ir->operands[1]->type->components());
817 assert(ir->type == ir->operands[0]->type);
823 assert(ir->operands[0]->type->base_type ==
824 ir->operands[1]->type->base_type);
825 assert(ir->type->is_integer_16_32_64());
826 if (ir->operands[0]->type->is_vector() &&
827 ir->operands[1]->type->is_vector()) {
828 assert(ir->operands[0]->type->vector_elements ==
829 ir->operands[1]->type->vector_elements);
836 assert(ir->type->is_boolean());
837 assert(ir->operands[0]->type->is_boolean());
838 assert(ir->operands[1]->type->is_boolean());
842 assert(ir->type == glsl_type::float_type ||
843 ir->type == glsl_type::double_type ||
844 ir->type == glsl_type::float16_t_type);
845 assert(ir->operands[0]->type->is_float_16_32_64());
846 assert(ir->operands[0]->type->is_vector());
847 assert(ir->operands[0]->type == ir->operands[1]->type);
851 assert(ir->operands[0]->type == glsl_type::uint_type);
853 assert(ir->operands[1]->type == glsl_type::uint_type);
857 assert(ir->operands[0]->type == ir->type);
858 assert(ir->operands[0]->type->is_float_32_64());
859 assert(ir->operands[1]->type->base_type == GLSL_TYPE_INT);
860 assert(ir->operands[0]->type->components() ==
861 ir->operands[1]->type->components());
865 assert(ir->operands[0]->type->is_vector());
866 assert(ir->operands[1]->type->is_scalar()
867 && ir->operands[1]->type->is_integer_16_32());
871 assert(ir->operands[0]->type == ir->type);
872 assert(ir->operands[0]->type->is_float_16_32());
873 assert(ir->operands[1]->type->components() == 2);
874 assert(ir->operands[1]->type->is_float_16_32());
878 assert(ir->operands[0]->type == ir->type);
879 assert(ir->operands[0]->type->is_float_16_32());
880 assert(ir->operands[1]->type == glsl_type::int_type ||
881 ir->operands[1]->type == glsl_type::int16_t_type);
885 assert(ir->operands[0]->type->is_float_16_32_64());
886 assert(ir->operands[1]->type == ir->operands[0]->type);
887 assert(ir->type == ir->operands[0]->type);
891 assert(ir->type->is_float_16_32_64());
892 assert(ir->type == ir->operands[0]->type);
893 assert(ir->type == ir->operands[1]->type);
894 assert(ir->type == ir->operands[2]->type);
898 assert(ir->operands[0]->type->is_float_16_32_64());
899 assert(ir->operands[0]->type == ir->operands[1]->type);
900 assert(ir->operands[2]->type == ir->operands[0]->type ||
901 ir->operands[2]->type == glsl_type::float_type ||
902 ir->operands[2]->type == glsl_type::double_type ||
903 ir->operands[2]->type == glsl_type::float16_t_type);
907 assert(ir->operands[0]->type->is_boolean());
908 assert(ir->type->vector_elements == ir->operands[0]->type->vector_elements);
909 assert(ir->type == ir->operands[1]->type);
910 assert(ir->type == ir->operands[2]->type);
914 assert(ir->type->is_integer_16_32());
915 assert(ir->operands[0]->type == ir->type);
916 assert(ir->operands[1]->type == ir->type);
917 assert(ir->operands[2]->type == ir->type);
921 assert(ir->operands[0]->type->is_vector());
922 assert(ir->operands[1]->type->is_scalar());
923 assert(ir->operands[0]->type->base_type == ir->operands[1]->type->base_type);
924 assert(ir->operands[2]->type->is_scalar()
925 && ir->operands[2]->type->is_integer_16_32());
926 assert(ir->type == ir->operands[0]->type);
930 assert(ir->type->is_integer_16_32());
931 assert(ir->operands[0]->type == ir->type);
932 assert(ir->operands[1]->type == ir->type);
933 assert(ir->operands[2]->type == ir->type);
934 assert(ir->operands[3]->type == ir->type);
945 switch (ir->type->vector_elements) {
947 assert(ir->operands[0]->type->is_scalar());
948 assert(ir->operands[0]->type->base_type == ir->type->base_type);
949 assert(ir->operands[1] == NULL);
950 assert(ir->operands[2] == NULL);
951 assert(ir->operands[3] == NULL);
954 assert(ir->operands[0]->type->is_scalar());
955 assert(ir->operands[0]->type->base_type == ir->type->base_type);
956 assert(ir->operands[1]->type->is_scalar());
957 assert(ir->operands[1]->type->base_type == ir->type->base_type);
958 assert(ir->operands[2] == NULL);
959 assert(ir->operands[3] == NULL);
962 assert(ir->operands[0]->type->is_scalar());
963 assert(ir->operands[0]->type->base_type == ir->type->base_type);
964 assert(ir->operands[1]->type->is_scalar());
965 assert(ir->operands[1]->type->base_type == ir->type->base_type);
966 assert(ir->operands[2]->type->is_scalar());
967 assert(ir->operands[2]->type->base_type == ir->type->base_type);
968 assert(ir->operands[3] == NULL);
971 assert(ir->operands[0]->type->is_scalar());
972 assert(ir->operands[0]->type->base_type == ir->type->base_type);
973 assert(ir->operands[1]->type->is_scalar());
974 assert(ir->operands[1]->type->base_type == ir->type->base_type);
975 assert(ir->operands[2]->type->is_scalar());
976 assert(ir->operands[2]->type->base_type == ir->type->base_type);
977 assert(ir->operands[3]->type->is_scalar());
978 assert(ir->operands[3]->type->base_type == ir->type->base_type);
993 ir_validate::visit_leave(ir_swizzle *ir)
995 unsigned int chans[4] = {ir->mask.x, ir->mask.y, ir->mask.z, ir->mask.w};
997 for (unsigned int i = 0; i < ir->type->vector_elements; i++) {
998 if (chans[i] >= ir->val->type->vector_elements) {
1000 "in the value.\n", (void *) ir);
1001 ir->print();
1010 ir_validate::visit(ir_variable *ir)
1017 if (ir->name && ir->is_name_ralloced())
1018 assert(ralloc_parent(ir->name) == ir);
1020 _mesa_set_add(ir_set, ir);
1026 if (ir->type->array_size() > 0) {
1027 if (ir->data.max_array_access >= (int)ir->type->length) {
1029 ir->data.max_array_access, ir->type->length - 1);
1030 ir->print();
1039 if (ir->is_interface_instance()) {
1041 ir->get_interface_type()->fields.structure;
1042 for (unsigned i = 0; i < ir->get_interface_type()->length; i++) {
1046 ir->get_max_ifc_array_access();
1054 ir->print();
1061 if (ir->constant_initializer != NULL && !ir->data.has_initializer) {
1064 ir->print();
1068 if (ir->data.mode == ir_var_uniform
1069 && is_gl_identifier(ir->name)
1070 && ir->get_state_slots() == NULL) {
1072 ir->print();
1080 ir_validate::visit_enter(ir_assignment *ir)
1082 const ir_dereference *const lhs = ir->lhs;
1084 if (ir->write_mask == 0) {
1087 ir->print();
1093 if (ir->write_mask & (1 << i))
1097 if (lhs_components != ir->rhs->type->vector_elements) {
1100 lhs_components, ir->rhs->type->vector_elements);
1101 ir->print();
1106 if (lhs->type->base_type != ir->rhs->type->base_type) {
1110 ir->rhs->print();
1115 this->validate_ir(ir, this->data_enter);
1121 ir_validate::visit_enter(ir_call *ir)
1123 ir_function_signature *const callee = ir->callee;
1130 if (ir->return_deref) {
1131 if (ir->return_deref->type != callee->return_type) {
1133 callee->return_type->name, ir->return_deref->type->name);
1142 const exec_node *actual_param_node = ir->actual_parameters.get_head_raw();
1174 ir->print();
1182 ir_validate::validate_ir(ir_instruction *ir, void *data)
1186 if (_mesa_set_search(ir_set, ir)) {
1187 printf("Instruction node present twice in ir tree:\n");
1188 ir->print();
1192 _mesa_set_add(ir_set, ir);
1196 check_node_type(ir_instruction *ir, void *data)
1200 if (ir->ir_type >= ir_type_max) {
1202 ir->print(); printf("\n");
1204 ir_rvalue *value = ir->as_rvalue();
1224 foreach_in_list(ir_instruction, ir, instructions) {
1225 visit_tree(ir, check_node_type, NULL);