Home
last modified time | relevance | path

Searched refs:ir (Results 1 – 25 of 859) sorted by relevance

12345678910>>...35

/third_party/mesa3d/src/compiler/glsl/
Dir_validate.cpp64 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);
[all …]
Dlower_instructions.cpp113 void reverse_to_shifts(ir_expression *ir);
114 void find_lsb_to_float_cast(ir_expression *ir);
115 void find_msb_to_float_cast(ir_expression *ir);
116 void imul_high_to_mul(ir_expression *ir);
117 void sqrt_to_abs_sqrt(ir_expression *ir);
144 lower_instructions_visitor::sub_to_add_neg(ir_expression *ir) in sub_to_add_neg() argument
146 ir->operation = ir_binop_add; in sub_to_add_neg()
147 ir->init_num_operands(); in sub_to_add_neg()
148 ir->operands[1] = new(ir) ir_expression(ir_unop_neg, ir->operands[1]->type, in sub_to_add_neg()
149 ir->operands[1], NULL); in sub_to_add_neg()
[all …]
Dir_rvalue_visitor.cpp38 ir_rvalue_base_visitor::rvalue_visit(ir_expression *ir) in rvalue_visit() argument
42 for (operand = 0; operand < ir->num_operands; operand++) { in rvalue_visit()
43 handle_rvalue(&ir->operands[operand]); in rvalue_visit()
50 ir_rvalue_base_visitor::rvalue_visit(ir_texture *ir) in rvalue_visit() argument
52 handle_rvalue(&ir->coordinate); in rvalue_visit()
53 handle_rvalue(&ir->projector); in rvalue_visit()
54 handle_rvalue(&ir->shadow_comparator); in rvalue_visit()
55 handle_rvalue(&ir->offset); in rvalue_visit()
56 handle_rvalue(&ir->clamp); in rvalue_visit()
58 switch (ir->op) { in rvalue_visit()
[all …]
Dir_print_visitor.cpp71 foreach_in_list(ir_instruction, ir, instructions) { in _mesa_print_ir()
72 ir->fprint(f); in _mesa_print_ir()
73 if (ir->ir_type != ir_type_function) in _mesa_print_ir()
82 const ir_instruction *ir = (const ir_instruction *)instruction; in fprint_ir() local
83 ir->fprint(f); in fprint_ir()
149 void ir_print_visitor::visit(ir_variable *ir) in visit() argument
154 if (ir->data.binding) in visit()
155 snprintf(binding, sizeof(binding), "binding=%i ", ir->data.binding); in visit()
158 if (ir->data.location != -1) in visit()
159 snprintf(loc, sizeof(loc), "location=%i ", ir->data.location); in visit()
[all …]
Dir_hierarchical_visitor.cpp38 ir_hierarchical_visitor::visit(ir_rvalue *ir) in visit() argument
40 call_enter_leave_callbacks(ir); in visit()
46 ir_hierarchical_visitor::visit(ir_variable *ir) in visit() argument
48 call_enter_leave_callbacks(ir); in visit()
54 ir_hierarchical_visitor::visit(ir_constant *ir) in visit() argument
56 call_enter_leave_callbacks(ir); in visit()
62 ir_hierarchical_visitor::visit(ir_loop_jump *ir) in visit() argument
64 call_enter_leave_callbacks(ir); in visit()
70 ir_hierarchical_visitor::visit(ir_dereference_variable *ir) in visit() argument
72 call_enter_leave_callbacks(ir); in visit()
[all …]
Dir_builder_print_visitor.cpp63 virtual ir_visitor_status visit_enter(ir_texture *ir);
69 void print_without_declaration(const ir_rvalue *ir);
70 void print_without_declaration(const ir_constant *ir);
71 void print_without_declaration(const ir_dereference_variable *ir);
72 void print_without_declaration(const ir_swizzle *ir);
73 void print_without_declaration(const ir_expression *ir);
91 is_simple_operand(const ir_rvalue *ir, unsigned depth = 1) in is_simple_operand() argument
96 switch (ir->ir_type) { in is_simple_operand()
101 if (ir->type == glsl_type::uint_type || in is_simple_operand()
102 ir->type == glsl_type::int_type || in is_simple_operand()
[all …]
Dlower_precision.cpp48 virtual ir_visitor_status visit_enter(ir_call *ir);
109 static void stack_enter(class ir_instruction *ir, void *data);
110 static void stack_leave(class ir_instruction *ir, void *data);
112 virtual ir_visitor_status visit(ir_constant *ir);
113 virtual ir_visitor_status visit(ir_dereference_variable *ir);
115 virtual ir_visitor_status visit_enter(ir_dereference_record *ir);
116 virtual ir_visitor_status visit_enter(ir_dereference_array *ir);
117 virtual ir_visitor_status visit_enter(ir_texture *ir);
118 virtual ir_visitor_status visit_enter(ir_expression *ir);
120 virtual ir_visitor_status visit_leave(ir_assignment *ir);
[all …]
Dopt_algebraic.cpp62 virtual ir_visitor_status visit_enter(ir_assignment *ir);
64 ir_rvalue *handle_expression(ir_expression *ir);
87 ir_algebraic_visitor::visit_enter(ir_assignment *ir) in visit_enter() argument
89 ir_variable *var = ir->lhs->variable_referenced(); in visit_enter()
104 is_vec_zero(ir_constant *ir) in is_vec_zero() argument
106 return (ir == NULL) ? false : ir->is_zero(); in is_vec_zero()
110 is_vec_one(ir_constant *ir) in is_vec_one() argument
112 return (ir == NULL) ? false : ir->is_one(); in is_vec_one()
116 is_vec_two(ir_constant *ir) in is_vec_two() argument
118 return (ir == NULL) ? false : ir->is_value(2.0, 2); in is_vec_two()
[all …]
Dlower_jumps.cpp280 void truncate_after_instruction(exec_node *ir) in truncate_after_instruction()
282 if (!ir) in truncate_after_instruction()
285 while (!ir->get_next()->is_tail_sentinel()) { in truncate_after_instruction()
286 ((ir_instruction *)ir->get_next())->remove(); in truncate_after_instruction()
291 void move_outer_block_inside(ir_instruction *ir, exec_list *inner_block) in move_outer_block_inside()
293 while (!ir->get_next()->is_tail_sentinel()) { in move_outer_block_inside()
294 ir_instruction *move_ir = (ir_instruction *)ir->get_next(); in move_outer_block_inside()
305 void insert_lowered_return(ir_return *ir) in insert_lowered_return()
310 ir->insert_before( in insert_lowered_return()
311 new(ir) ir_assignment( in insert_lowered_return()
[all …]
Dopt_tree_grafting.cpp81 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
[all …]
Dlower_tess_level.cpp66 bool is_tess_level_array(ir_rvalue *ir);
67 ir_rvalue *lower_tess_level_array(ir_rvalue *ir);
69 void visit_new_assignment(ir_assignment *ir);
103 lower_tess_level_visitor::visit(ir_variable *ir) in visit() argument
105 if ((!ir->name) || in visit()
106 ((strcmp(ir->name, "gl_TessLevelInner") != 0) && in visit()
107 (strcmp(ir->name, "gl_TessLevelOuter") != 0))) in visit()
110 assert (ir->type->is_array()); in visit()
112 if (strcmp(ir->name, "gl_TessLevelOuter") == 0) { in visit()
116 old_tess_level_outer_var = ir; in visit()
[all …]
Dopt_dead_code_local.cpp51 assignment_entry(ir_variable *lhs, ir_assignment *ir) in assignment_entry() argument
54 assert(ir); in assignment_entry()
56 this->ir = ir; in assignment_entry()
57 this->unused = ir->write_mask; in assignment_entry()
61 ir_assignment *ir; member in __anon0051e8240111::assignment_entry
96 virtual ir_visitor_status visit(ir_dereference_variable *ir) in visit() argument
98 use_channels(ir->var, ~0); in visit()
103 virtual ir_visitor_status visit(ir_swizzle *ir) in visit() argument
105 ir_dereference_variable *deref = ir->val->as_dereference_variable(); in visit()
110 used |= 1 << ir->mask.x; in visit()
[all …]
Dlower_distance.cpp89 bool is_distance_vec8(ir_rvalue *ir);
90 ir_rvalue *lower_distance_vec8(ir_rvalue *ir);
92 void visit_new_assignment(ir_assignment *ir);
138 lower_distance_visitor::visit(ir_variable *ir) in visit() argument
143 if (!ir->name || strcmp(ir->name, in_name) != 0) in visit()
145 assert (ir->type->is_array()); in visit()
147 if (ir->data.mode == ir_var_shader_out) { in visit()
152 } else if (ir->data.mode == ir_var_shader_in) { in visit()
163 *old_var = ir; in visit()
169 *new_var = ir->clone(ralloc_parent(ir), NULL); in visit()
[all …]
Dglsl_to_nir.cpp83 void create_function(ir_function_signature *ir);
90 nir_ssa_def *evaluate_rvalue(ir_rvalue *ir);
106 nir_deref_instr *evaluate_deref(ir_instruction *ir);
108 nir_constant *constant_copy(ir_constant *ir, void *mem_ctx);
160 virtual ir_visitor_status visit_enter(ir_function_signature *ir) in visit_enter() argument
163 if (ir->is_intrinsic()) in visit_enter()
166 foreach_in_list(ir_variable, param, &ir->parameters) { in visit_enter()
178 if (!glsl_type_is_vector_or_scalar(ir->return_type) && in visit_enter()
179 !ir->return_type->is_void()) { in visit_enter()
194 has_unsupported_function_param(exec_list *ir) in has_unsupported_function_param() argument
[all …]
Dlower_vec_index_to_cond_assign.cpp62 ir_rvalue *convert_vector_extract_to_cond_assign(ir_rvalue *ir);
77 ir_vec_index_to_cond_assign_visitor::convert_vector_extract_to_cond_assign(ir_rvalue *ir) in convert_vector_extract_to_cond_assign() argument
79 ir_expression *const expr = ir->as_expression(); in convert_vector_extract_to_cond_assign()
82 return ir; in convert_vector_extract_to_cond_assign()
97 return ir; in convert_vector_extract_to_cond_assign()
105 return new(base_ir) ir_expression(ir_binop_vector_extract, ir->type, in convert_vector_extract_to_cond_assign()
110 return ir; in convert_vector_extract_to_cond_assign()
114 ir_vec_index_to_cond_assign_visitor::visit_enter(ir_expression *ir) in visit_enter() argument
116 for (unsigned i = 0; i < ir->num_operands; i++) in visit_enter()
117 ir->operands[i] = convert_vector_extract_to_cond_assign(ir->operands[i]); in visit_enter()
[all …]
Dtest_optpass.cpp57 do_optimization(struct exec_list *ir, const char *optimization, in do_optimization() argument
66 return do_common_optimization(ir, int_0 != 0, options, true); in do_optimization()
68 return do_algebraic(ir, true, options); in do_optimization()
70 return do_constant_folding(ir); in do_optimization()
72 return do_constant_variable(ir); in do_optimization()
74 return do_constant_variable_unlinked(ir); in do_optimization()
76 return do_copy_propagation_elements(ir); in do_optimization()
78 return do_constant_propagation(ir); in do_optimization()
80 return do_dead_code(ir); in do_optimization()
82 return do_dead_code_local(ir); in do_optimization()
[all …]
Dopt_if_simplification.cpp55 ir_if_simplification_visitor::visit_enter(ir_assignment *ir) in visit_enter() argument
57 (void) ir; in visit_enter()
72 ir_if_simplification_visitor::visit_leave(ir_if *ir) in visit_leave() argument
75 if (ir->then_instructions.is_empty() && in visit_leave()
76 ir->else_instructions.is_empty()) { in visit_leave()
77 ir->remove(); in visit_leave()
88 ir->condition->constant_expression_value(ralloc_parent(ir)); in visit_leave()
94 ir->insert_before(&ir->then_instructions); in visit_leave()
96 ir->insert_before(&ir->else_instructions); in visit_leave()
98 ir->remove(); in visit_leave()
[all …]
/third_party/skia/src/sksl/
DBUILD.bazel88 "ir/SkSLBinaryExpression.cpp",
89 "ir/SkSLBinaryExpression.h",
90 "ir/SkSLBlock.cpp",
91 "ir/SkSLBlock.h",
92 "ir/SkSLBreakStatement.h",
93 "ir/SkSLChildCall.cpp",
94 "ir/SkSLChildCall.h",
95 "ir/SkSLCodeStringExpression.h",
96 "ir/SkSLConstructor.cpp",
97 "ir/SkSLConstructor.h",
[all …]
/third_party/skia/gn/
Dsksl.gni103 "$_src/sksl/ir/SkSLBinaryExpression.cpp",
104 "$_src/sksl/ir/SkSLBinaryExpression.h",
105 "$_src/sksl/ir/SkSLBlock.cpp",
106 "$_src/sksl/ir/SkSLBlock.h",
107 "$_src/sksl/ir/SkSLBreakStatement.h",
108 "$_src/sksl/ir/SkSLChildCall.cpp",
109 "$_src/sksl/ir/SkSLChildCall.h",
110 "$_src/sksl/ir/SkSLConstructor.cpp",
111 "$_src/sksl/ir/SkSLConstructor.h",
112 "$_src/sksl/ir/SkSLConstructorArray.cpp",
[all …]
/third_party/flutter/skia/third_party/externals/spirv-tools/source/opt/
Dlocal_single_store_elim_pass.h38 using cbb_ptr = const ir::BasicBlock*;
43 Status Process(ir::Module*) override;
51 bool IsMathType(const ir::Instruction* typeInst) const;
55 bool IsTargetType(const ir::Instruction* typeInst) const;
59 ir::Instruction* GetPtr(ir::Instruction* ip, uint32_t* varId);
78 void SingleStoreAnalyze(ir::Function* func);
82 void ReplaceAndDeleteLoad(ir::Instruction* loadInst, uint32_t replId);
85 std::function<const std::vector<ir::BasicBlock*>*(const ir::BasicBlock*)>;
95 void CalculateImmediateDominators(ir::Function* func);
99 bool Dominates(ir::BasicBlock* blk0, uint32_t idx0,
[all …]
Dinline_pass.h36 using cbb_ptr = const ir::BasicBlock*;
40 std::function<std::vector<ir::BasicBlock*>*(const ir::BasicBlock*)>;
43 Status Process(ir::Module*) override;
52 inline void FinalizeNextId(ir::Module* module) { in FinalizeNextId()
64 void AddBranch(uint32_t labelId, std::unique_ptr<ir::BasicBlock>* block_ptr);
68 uint32_t false_id, std::unique_ptr<ir::BasicBlock>* block_ptr);
72 std::unique_ptr<ir::BasicBlock>* block_ptr);
76 std::unique_ptr<ir::BasicBlock>* block_ptr);
80 std::unique_ptr<ir::BasicBlock>* block_ptr);
83 std::unique_ptr<ir::Instruction> NewLabel(uint32_t label_id);
[all …]
Dlocal_ssa_elim_pass.h38 using cbb_ptr = const ir::BasicBlock*;
42 std::function<std::vector<ir::BasicBlock*>*(const ir::BasicBlock*)>;
46 Status Process(ir::Module*) override;
54 bool IsMathType(const ir::Instruction* typeInst) const;
58 bool IsTargetType(const ir::Instruction* typeInst) const;
62 ir::Instruction* GetPtr(ir::Instruction* ip, uint32_t* varId);
72 uint32_t GetPointeeTypeId(const ir::Instruction* ptrInst) const;
76 void ReplaceAndDeleteLoad(ir::Instruction* loadInst, uint32_t replId);
86 void AddStores(uint32_t ptr_id, std::queue<ir::Instruction*>* insts);
90 void DCEInst(ir::Instruction* inst);
[all …]
Dlocal_access_chain_convert_pass.h41 Status Process(ir::Module*) override;
50 bool IsMathType(const ir::Instruction* typeInst) const;
55 bool IsTargetType(const ir::Instruction* typeInst) const;
60 ir::Instruction* GetPtr(ir::Instruction* ip, uint32_t* varId);
65 void FindTargetVars(ir::Function* func);
76 void DeleteIfUseless(ir::Instruction* inst);
80 void ReplaceAndDeleteLoad(ir::Instruction* loadInst,
82 ir::Instruction* ptrInst);
85 uint32_t GetPointeeTypeId(const ir::Instruction* ptrInst) const;
90 const std::vector<ir::Operand>& in_opnds,
[all …]
Dinline_pass.cpp36 ir::Module::inst_iterator type_itr = module_->types_values_begin(); in FindPointerToType()
38 const ir::Instruction* type_inst = &*type_itr; in FindPointerToType()
51 std::unique_ptr<ir::Instruction> type_inst(new ir::Instruction( in AddPointerToType()
61 std::unique_ptr<ir::BasicBlock>* block_ptr) { in AddBranch()
62 std::unique_ptr<ir::Instruction> newBranch(new ir::Instruction( in AddBranch()
69 uint32_t false_id, std::unique_ptr<ir::BasicBlock>* block_ptr) { in AddBranchCond()
70 std::unique_ptr<ir::Instruction> newBranch(new ir::Instruction( in AddBranchCond()
79 std::unique_ptr<ir::BasicBlock>* block_ptr) { in AddLoopMerge()
80 std::unique_ptr<ir::Instruction> newLoopMerge(new ir::Instruction( in AddLoopMerge()
89 std::unique_ptr<ir::BasicBlock>* block_ptr) { in AddStore()
[all …]
Ddead_branch_elim_pass.h39 using cbb_ptr = const ir::BasicBlock*;
43 std::function<std::vector<ir::BasicBlock*>*(const ir::BasicBlock*)>;
47 Status Process(ir::Module*) override;
53 uint32_t MergeBlockIdIfAny(const ir::BasicBlock& blk, uint32_t* cbid) const;
63 void ComputeStructuredSuccessors(ir::Function* func);
70 ir::Function* func, std::list<ir::BasicBlock*>* order);
77 void AddBranch(uint32_t labelId, ir::BasicBlock* bp);
80 void AddSelectionMerge(uint32_t labelId, ir::BasicBlock* bp);
85 uint32_t falseLabId, ir::BasicBlock* bp);
88 void KillAllInsts(ir::BasicBlock* bp);
[all …]

12345678910>>...35