Lines Matching refs:ir
81 ir_visitor_status check_graft(ir_instruction *ir, ir_variable *var);
96 dereferences_variable_callback(ir_instruction *ir, void *data) in dereferences_variable_callback() argument
99 ir_dereference_variable *deref = ir->as_dereference_variable(); in dereferences_variable_callback()
106 dereferences_variable(ir_instruction *ir, ir_variable *var) in dereferences_variable() argument
113 visit_tree(ir, dereferences_variable_callback, &info); in dereferences_variable()
146 ir_tree_grafting_visitor::visit_enter(ir_loop *ir) in visit_enter() argument
148 (void)ir; in visit_enter()
163 ir_tree_grafting_visitor::check_graft(ir_instruction *ir, ir_variable *var) in check_graft() argument
168 ir->fprint(stderr); in check_graft()
178 ir_tree_grafting_visitor::visit_leave(ir_assignment *ir) in visit_leave() argument
180 if (do_graft(&ir->rhs)) in visit_leave()
186 return check_graft(ir, ir->lhs->variable_referenced()); in visit_leave()
190 ir_tree_grafting_visitor::visit_enter(ir_function *ir) in visit_enter() argument
192 (void) ir; in visit_enter()
197 ir_tree_grafting_visitor::visit_enter(ir_function_signature *ir) in visit_enter() argument
199 (void)ir; in visit_enter()
204 ir_tree_grafting_visitor::visit_enter(ir_call *ir) in visit_enter() argument
206 foreach_two_lists(formal_node, &ir->callee->parameters, in visit_enter()
207 actual_node, &ir->actual_parameters) { in visit_enter()
209 ir_rvalue *ir = (ir_rvalue *) actual_node; in visit_enter() local
210 ir_rvalue *new_ir = ir; in visit_enter()
214 if (check_graft(ir, sig_param) == visit_stop) in visit_enter()
220 ir->replace_with(new_ir); in visit_enter()
225 if (ir->return_deref && check_graft(ir, ir->return_deref->var) == visit_stop) in visit_enter()
232 ir_tree_grafting_visitor::visit_enter(ir_expression *ir) in visit_enter() argument
234 for (unsigned int i = 0; i < ir->num_operands; i++) { in visit_enter()
235 if (do_graft(&ir->operands[i])) in visit_enter()
243 ir_tree_grafting_visitor::visit_enter(ir_if *ir) in visit_enter() argument
245 if (do_graft(&ir->condition)) in visit_enter()
255 ir_tree_grafting_visitor::visit_enter(ir_swizzle *ir) in visit_enter() argument
257 if (do_graft(&ir->val)) in visit_enter()
264 ir_tree_grafting_visitor::visit_enter(ir_texture *ir) in visit_enter() argument
266 if (do_graft(&ir->coordinate) || in visit_enter()
267 do_graft(&ir->projector) || in visit_enter()
268 do_graft(&ir->offset) || in visit_enter()
269 do_graft(&ir->shadow_comparator) || in visit_enter()
270 do_graft(&ir->clamp)) in visit_enter()
273 switch (ir->op) { in visit_enter()
281 if (do_graft(&ir->lod_info.bias)) in visit_enter()
287 if (do_graft(&ir->lod_info.lod)) in visit_enter()
291 if (do_graft(&ir->lod_info.sample_index)) in visit_enter()
295 if (do_graft(&ir->lod_info.grad.dPdx) || in visit_enter()
296 do_graft(&ir->lod_info.grad.dPdy)) in visit_enter()
300 if (do_graft(&ir->lod_info.component)) in visit_enter()
326 for (ir_instruction *ir = (ir_instruction *)start->next; in try_tree_grafting() local
327 ir != bb_last->next; in try_tree_grafting()
328 ir = (ir_instruction *)ir->next) { in try_tree_grafting()
332 ir->fprint(stderr); in try_tree_grafting()
336 ir_visitor_status s = ir->accept(&v); in try_tree_grafting()
350 ir_instruction *ir, *next; in tree_grafting_basic_block() local
352 for (ir = bb_first, next = (ir_instruction *)ir->next; in tree_grafting_basic_block()
353 ir != bb_last->next; in tree_grafting_basic_block()
354 ir = next, next = (ir_instruction *)ir->next) { in tree_grafting_basic_block()
355 ir_assignment *assign = ir->as_assignment(); in tree_grafting_basic_block()