Home
last modified time | relevance | path

Searched refs:parent_instr (Results 1 – 25 of 143) sorted by relevance

123456

/third_party/mesa3d/src/compiler/nir/
Dnir_repair_ssa.c60 if (src->parent_instr->type == nir_instr_type_phi) { in get_src_block()
63 return src->parent_instr->block; in get_src_block()
75 !nir_block_dominates(def->parent_instr->block, get_src_block(src))) { in repair_ssa_def()
85 !nir_block_dominates(def->parent_instr->block, block_before_if)) { in repair_ssa_def()
96 BITSET_SET(state->def_set, def->parent_instr->block->index); in repair_ssa_def()
102 nir_phi_builder_value_set_block_def(val, def->parent_instr->block, def); in repair_ssa_def()
106 if (src_block == def->parent_instr->block) { in repair_ssa_def()
120 if (def->parent_instr->type == nir_instr_type_deref && in repair_ssa_def()
121 src->parent_instr->type == nir_instr_type_deref && in repair_ssa_def()
122 nir_instr_as_deref(src->parent_instr)->deref_type != nir_deref_type_cast) { in repair_ssa_def()
[all …]
Dnir_lower_flrp.c55 nir_instr_as_alu(neg_a->parent_instr)->exact = alu->exact; in replace_with_strict_ffma()
58 nir_instr_as_alu(inner_ffma->parent_instr)->exact = alu->exact; in replace_with_strict_ffma()
61 nir_instr_as_alu(outer_ffma->parent_instr)->exact = alu->exact; in replace_with_strict_ffma()
84 nir_instr_as_alu(neg_c->parent_instr)->exact = alu->exact; in replace_with_single_ffma()
88 nir_instr_as_alu(one_minus_c->parent_instr)->exact = alu->exact; in replace_with_single_ffma()
91 nir_instr_as_alu(b_times_c->parent_instr)->exact = alu->exact; in replace_with_single_ffma()
94 nir_instr_as_alu(final_ffma->parent_instr)->exact = alu->exact; in replace_with_single_ffma()
117 nir_instr_as_alu(neg_c->parent_instr)->exact = alu->exact; in replace_with_strict()
121 nir_instr_as_alu(one_minus_c->parent_instr)->exact = alu->exact; in replace_with_strict()
124 nir_instr_as_alu(first_product->parent_instr)->exact = alu->exact; in replace_with_strict()
[all …]
Dnir_move_vec_src_uses_to_dest.c55 if (instr->index <= def->parent_instr->index) { in ssa_def_dominates_instr()
57 } else if (def->parent_instr->block == instr->block) { in ssa_def_dominates_instr()
58 return def->parent_instr->index < instr->index; in ssa_def_dominates_instr()
60 return nir_block_dominates(def->parent_instr->block, instr->block); in ssa_def_dominates_instr()
128 if (use->parent_instr == &vec->instr) in move_vec_src_uses_to_dest_block()
132 if (!ssa_def_dominates_instr(&vec->dest.dest.ssa, use->parent_instr)) in move_vec_src_uses_to_dest_block()
136 if (use->parent_instr->type != nir_instr_type_alu) in move_vec_src_uses_to_dest_block()
141 nir_alu_instr *use_alu = nir_instr_as_alu(use->parent_instr); in move_vec_src_uses_to_dest_block()
166 nir_instr_rewrite_src(use->parent_instr, use, in move_vec_src_uses_to_dest_block()
Dnir_to_lcssa.c84 if (use->parent_instr->block->index <= block_before_loop->index || in is_use_inside_loop()
85 use->parent_instr->block->index >= block_after_loop->index) { in is_use_inside_loop()
95 nir_instr *instr = def->parent_instr; in is_defined_before_loop()
117 if (def->parent_instr->pass_flags == undefined) in def_is_invariant()
118 def->parent_instr->pass_flags = instr_is_invariant(def->parent_instr, loop); in def_is_invariant()
120 return def->parent_instr->pass_flags == invariant; in def_is_invariant()
201 assert(def->parent_instr->pass_flags != undefined); in convert_loop_exit_for_ssa()
202 if (def->parent_instr->pass_flags == invariant) in convert_loop_exit_for_ssa()
207 if (use->parent_instr->type == nir_instr_type_phi && in convert_loop_exit_for_ssa()
208 use->parent_instr->block == state->block_after_loop) { in convert_loop_exit_for_ssa()
[all …]
Dnir_from_ssa.c64 if (a->parent_instr->type == nir_instr_type_ssa_undef) in def_after()
67 if (b->parent_instr->type == nir_instr_type_ssa_undef) in def_after()
73 if (a->parent_instr->block == b->parent_instr->block) in def_after()
74 return a->parent_instr->index > b->parent_instr->index; in def_after()
77 return a->parent_instr->block->dom_pre_index > in def_after()
78 b->parent_instr->block->dom_pre_index; in def_after()
85 if (a->parent_instr->type == nir_instr_type_ssa_undef) { in ssa_def_dominates()
90 } else if (a->parent_instr->block == b->parent_instr->block) { in ssa_def_dominates()
93 return nir_block_dominates(a->parent_instr->block, in ssa_def_dominates()
94 b->parent_instr->block); in ssa_def_dominates()
[all …]
Dnir_liveness.c315 def->parent_instr->block == instr->block) { in nir_ssa_def_is_live_at()
330 if (a->parent_instr == b->parent_instr) { in nir_ssa_defs_interfere()
335 } else if (a->parent_instr->type == nir_instr_type_ssa_undef || in nir_ssa_defs_interfere()
336 b->parent_instr->type == nir_instr_type_ssa_undef) { in nir_ssa_defs_interfere()
339 } else if (a->parent_instr->index < b->parent_instr->index) { in nir_ssa_defs_interfere()
340 return nir_ssa_def_is_live_at(a, b->parent_instr); in nir_ssa_defs_interfere()
342 return nir_ssa_def_is_live_at(b, a->parent_instr); in nir_ssa_defs_interfere()
352 nir_instr *instr = def->parent_instr; in def_cb()
359 src->parent_instr->index); in def_cb()
Dnir_opt_if.c163 if (cond->parent_instr->type != nir_instr_type_phi) in opt_peel_loop_initial_if()
166 nir_phi_instr *cond_phi = nir_instr_as_phi(cond->parent_instr); in opt_peel_loop_initial_if()
167 if (cond->parent_instr->block != header_block) in opt_peel_loop_initial_if()
312 bcsel->src[i].src.ssa->parent_instr->block != instr->block) in is_trivial_bcsel()
315 if (bcsel->src[i].src.ssa->parent_instr->type != nir_instr_type_phi) { in is_trivial_bcsel()
323 nir_foreach_phi_src(src, nir_instr_as_phi(bcsel->src[0].src.ssa->parent_instr)) { in is_trivial_bcsel()
439 nir_instr *const src_instr = alu->src[i].src.ssa->parent_instr; in opt_split_alu_of_phi()
459 if (src_of_phi->src.ssa->parent_instr->type != in opt_split_alu_of_phi()
464 if (src_of_phi->src.ssa->parent_instr->type != in opt_split_alu_of_phi()
501 if (!is_trivial_bcsel(use->parent_instr, true)) in opt_split_alu_of_phi()
[all …]
Dnir_opt_gcm.c166 nir_instr *src_instr = src->ssa->parent_instr; in is_src_scalarizable()
425 gcm_schedule_early_instr(src->ssa->parent_instr, void_state); in gcm_schedule_early_src()
435 &state->instr_infos[src->ssa->parent_instr->index]; in gcm_schedule_early_src()
571 nir_instr *use_instr = use_src->parent_instr; in gcm_schedule_late_def()
607 state->instr_infos[def->parent_instr->index].early_block; in gcm_schedule_late_def()
613 def->parent_instr->block = NULL; in gcm_schedule_late_def()
617 if (def->parent_instr->pass_flags & GCM_INSTR_SCHEDULE_EARLIER_ONLY && in gcm_schedule_late_def()
618 lca != def->parent_instr->block && in gcm_schedule_late_def()
619 nir_block_dominates(def->parent_instr->block, lca)) { in gcm_schedule_late_def()
620 lca = def->parent_instr->block; in gcm_schedule_late_def()
[all …]
Dnir_schedule.c254 src->parent_instr); in nir_schedule_reg_src_deps()
271 dest->reg.parent_instr); in nir_schedule_reg_dest_deps()
291 nir_schedule_node *def_n = nir_schedule_get_node(instr_map, def->parent_instr); in nir_schedule_ssa_deps()
295 src->parent_instr); in nir_schedule_ssa_deps()
539 _mesa_set_search(remaining_uses, src->parent_instr)) { in nir_schedule_regs_freed_src_cb()
851 src->parent_instr); in nir_schedule_mark_src_scheduled()
862 src->ssa->parent_instr->type != nir_instr_type_load_const) { in nir_schedule_mark_src_scheduled()
864 if (other_src->parent_instr == src->parent_instr) in nir_schedule_mark_src_scheduled()
869 other_src->parent_instr); in nir_schedule_mark_src_scheduled()
886 src->parent_instr, in nir_schedule_mark_src_scheduled()
[all …]
Dnir_lower_scratch.c81 if (!src->parent_instr) in only_used_for_load_store()
83 if (src->parent_instr->type == nir_instr_type_deref) { in only_used_for_load_store()
84 if (!only_used_for_load_store(nir_instr_as_deref(src->parent_instr))) in only_used_for_load_store()
86 } else if (src->parent_instr->type != nir_instr_type_intrinsic) { in only_used_for_load_store()
89 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(src->parent_instr); in only_used_for_load_store()
Dnir.c821 phi_src->src.parent_instr = &instr->instr; in nir_phi_instr_add_src()
993 src->parent_instr = instr; in add_use_cb()
1023 dest->reg.parent_instr = instr; in add_reg_def_cb()
1235 if (!nir_instr_free_and_dce_is_live(src->ssa->parent_instr)) in nir_instr_dce_add_dead_srcs_cb()
1236 nir_instr_worklist_push_tail(wl, src->ssa->parent_instr); in nir_instr_dce_add_dead_srcs_cb()
1457 if (src.ssa->parent_instr->type != nir_instr_type_load_const) in nir_src_as_const_value()
1460 nir_load_const_instr *load = nir_instr_as_load_const(src.ssa->parent_instr); in nir_src_as_const_value()
1477 if (src.ssa->parent_instr->type == nir_instr_type_load_const) in nir_src_is_dynamically_uniform()
1480 if (src.ssa->parent_instr->type == nir_instr_type_intrinsic) { in nir_src_is_dynamically_uniform()
1481 nir_intrinsic_instr *intr = nir_instr_as_intrinsic(src.ssa->parent_instr); in nir_src_is_dynamically_uniform()
[all …]
Dnir_opt_undef.c50 nir_instr *parent = instr->src[i].src.ssa->parent_instr; in opt_undef_csel()
86 alu->src[i].src.ssa->parent_instr->type != nir_instr_type_ssa_undef) in opt_undef_vecN()
101 nir_instr *instr = def->parent_instr; in nir_get_undef_mask()
115 alu->src[i].src.ssa->parent_instr->type == in nir_get_undef_mask()
Dnir_lower_mediump.c217 dst->parent_instr); in nir_lower_mediump_io()
452 src = tex->src[i].src.ssa->parent_instr; in nir_fold_16bit_sampler_conversions()
473 nir_instr *instr = src_alu->src[comp].src.ssa->parent_instr; in nir_fold_16bit_sampler_conversions()
492 nir_instr *instr = new_vec->src[comp].src.ssa->parent_instr; in nir_fold_16bit_sampler_conversions()
520 is_f16_to_f32 &= is_f16_to_f32_conversion(use->parent_instr); in nir_fold_16bit_sampler_conversions()
521 is_f32_to_f16 &= is_f32_to_f16_conversion(use->parent_instr); in nir_fold_16bit_sampler_conversions()
522 is_i16_to_i32 &= is_i16_to_i32_conversion(use->parent_instr); in nir_fold_16bit_sampler_conversions()
523 is_i32_to_i16 &= is_i32_to_i16_conversion(use->parent_instr); in nir_fold_16bit_sampler_conversions()
524 is_u16_to_u32 &= is_u16_to_u32_conversion(use->parent_instr); in nir_fold_16bit_sampler_conversions()
531 nir_alu_instr *conv = nir_instr_as_alu(use->parent_instr); in nir_fold_16bit_sampler_conversions()
Dnir_opt_phi_precision.c209 op = narrowing_conversion_op(use->parent_instr, op); in try_move_narrowing_dst()
238 b->cursor = nir_after_instr_and_phis(src->src.ssa->parent_instr); in try_move_narrowing_dst()
254 nir_alu_instr *alu = nir_instr_as_alu(use->parent_instr); in try_move_narrowing_dst()
314 nir_instr *instr = src->src.ssa->parent_instr; in find_widening_op()
352 nir_instr *instr = src->src.ssa->parent_instr; in find_widening_op()
391 nir_instr *instr = src->src.ssa->parent_instr; in try_move_widening_src()
Dnir_opt_peephole_select.c231 if (use->parent_instr->type != nir_instr_type_phi || in block_check_for_allowed_instrs()
232 use->parent_instr->block != block->successors[0]) in block_check_for_allowed_instrs()
314 assert(src->parent_instr->type == nir_instr_type_phi); in nir_opt_collapse_if()
316 nir_phi_get_src_from_block(nir_instr_as_phi(src->parent_instr), in nir_opt_collapse_if()
346 nir_phi_get_src_from_block(nir_instr_as_phi(src->parent_instr), in nir_opt_collapse_if()
349 nir_instr_rewrite_src(src->parent_instr, &phi_src->src, in nir_opt_collapse_if()
Dnir_lower_to_source_mods.c69 if (alu->src[i].src.ssa->parent_instr->type != nir_instr_type_alu) in nir_lower_to_source_mods_block()
72 nir_alu_instr *parent = nir_instr_as_alu(alu->src[i].src.ssa->parent_instr); in nir_lower_to_source_mods_block()
162 nir_instr *child = child_src->parent_instr; in nir_lower_to_source_mods_block()
188 nir_alu_instr *child_alu = nir_instr_as_alu(child_src->parent_instr); in nir_lower_to_source_mods_block()
Dnir_opt_intrinsics.c74 alu->src[1].src.ssa->parent_instr->block != alu->instr.block || in try_opt_bcsel_of_shuffle()
80 alu->src[2].src.ssa->parent_instr->block != alu->instr.block || in try_opt_bcsel_of_shuffle()
133 if (use_src->parent_instr->type == nir_instr_type_alu) { in opt_intrinsics_intrin()
134 nir_alu_instr *alu = nir_instr_as_alu(use_src->parent_instr); in opt_intrinsics_intrin()
/third_party/mesa3d/src/gallium/drivers/lima/ir/
Dlima_nir_split_loads.c70 if (intrin->src[0].ssa->parent_instr->type == nir_instr_type_load_const) in replace_intrinsic()
77 _mesa_hash_table_search(visited_instrs, src->parent_instr); in replace_intrinsic()
78 if (entry && (src->parent_instr->type != nir_instr_type_phi)) { in replace_intrinsic()
80 nir_instr_rewrite_src(src->parent_instr, src, nir_src_for_ssa(def)); in replace_intrinsic()
85 nir_instr_rewrite_src(src->parent_instr, src, nir_src_for_ssa(new)); in replace_intrinsic()
86 _mesa_hash_table_insert(visited_instrs, src->parent_instr, new); in replace_intrinsic()
106 _mesa_hash_table_search(visited_instrs, src->parent_instr); in replace_load_const()
107 if (entry && (src->parent_instr->type != nir_instr_type_phi)) { in replace_load_const()
109 nir_instr_rewrite_src(src->parent_instr, src, nir_src_for_ssa(def)); in replace_load_const()
116 nir_instr_rewrite_src(src->parent_instr, src, nir_src_for_ssa(new)); in replace_load_const()
[all …]
Dlima_nir_duplicate_consts.c37 if (last_parent_instr != use_src->parent_instr) { in lima_nir_duplicate_load_const()
39 b->cursor = nir_before_instr(use_src->parent_instr); in lima_nir_duplicate_load_const()
52 nir_instr_rewrite_src(use_src->parent_instr, use_src, nir_src_for_ssa(&dupl->def)); in lima_nir_duplicate_load_const()
53 last_parent_instr = use_src->parent_instr; in lima_nir_duplicate_load_const()
63 if (last_parent_instr != use_src->parent_instr) { in lima_nir_duplicate_load_const()
79 last_parent_instr = use_src->parent_instr; in lima_nir_duplicate_load_const()
Dlima_nir_duplicate_intrinsic.c38 if (last_parent_instr != use_src->parent_instr) { in lima_nir_duplicate_intrinsic()
40 b->cursor = nir_before_instr(use_src->parent_instr); in lima_nir_duplicate_intrinsic()
60 nir_instr_rewrite_src(use_src->parent_instr, use_src, nir_src_for_ssa(&dupl->dest.ssa)); in lima_nir_duplicate_intrinsic()
61 last_parent_instr = use_src->parent_instr; in lima_nir_duplicate_intrinsic()
71 if (last_parent_instr != use_src->parent_instr) { in lima_nir_duplicate_intrinsic()
94 last_parent_instr = use_src->parent_instr; in lima_nir_duplicate_intrinsic()
/third_party/mesa3d/src/freedreno/ir3/
Dir3_nir_lower_tex_prefetch.c34 nir_instr *parent_instr = ssa->parent_instr; in coord_offset() local
42 if (parent_instr->type == nir_instr_type_alu) { in coord_offset()
43 nir_alu_instr *alu = nir_instr_as_alu(parent_instr); in coord_offset()
69 if (parent_instr->type != nir_instr_type_intrinsic) in coord_offset()
72 nir_intrinsic_instr *input = nir_instr_as_intrinsic(parent_instr); in coord_offset()
84 nir_instr_as_intrinsic(input->src[0].ssa->parent_instr); in coord_offset()
/third_party/mesa3d/src/compiler/nir/tests/
Dcore_tests.cpp101 nir_cursor c = nir_instr_free_and_dce(add01->parent_instr); in TEST_F()
107 ASSERT_TRUE(nir_cursors_equal(c, nir_before_instr(add11->parent_instr))); in TEST_F()
117 nir_cursor c = nir_instr_free_and_dce(add->parent_instr); in TEST_F()
135 nir_cursor c = nir_instr_free_and_dce(add2->parent_instr); in TEST_F()
Dserialize_tests.cpp130 nir_alu_instr *fmax_alu = nir_instr_as_alu(fmax->parent_instr); in TEST_P()
154 nir_alu_instr *vec_alu = nir_instr_as_alu(vec->parent_instr); in TEST_P()
169 nir_alu_instr *fma_alu = nir_instr_as_alu(fma->parent_instr); in TEST_P()
191 nir_alu_instr *fma_alu = nir_instr_as_alu(fma->parent_instr); in TEST_P()
220 nir_alu_instr *fma_alu = nir_instr_as_alu(fma->parent_instr); in TEST_P()
248 nir_alu_instr *fma_alu = nir_instr_as_alu(fma->parent_instr); in TEST_P()
274 nir_alu_instr *vec_alu = nir_instr_as_alu(vec->parent_instr); in TEST_P()
Dload_store_vectorizer_tests.cpp253 nir_alu_instr *mov = nir_instr_as_alu(nir_mov(b, &load->dest.ssa)->parent_instr); in create_indirect_load()
320 nir_alu_instr *mov = nir_instr_as_alu(nir_mov(b, load)->parent_instr); in create_shared_load()
625 ASSERT_TRUE(test_alu(load->src[1].ssa->parent_instr, nir_op_ineg)); in TEST_F()
626 nir_ssa_def *offset = nir_instr_as_alu(load->src[1].ssa->parent_instr)->src[0].src.ssa; in TEST_F()
627 ASSERT_TRUE(test_alu(offset->parent_instr, nir_op_ishl)); in TEST_F()
628 nir_alu_instr *shl = nir_instr_as_alu(offset->parent_instr); in TEST_F()
742 nir_const_value *cv = nir_instr_as_load_const(val->parent_instr)->value; in TEST_F()
765 nir_const_value *cv = nir_instr_as_load_const(val->parent_instr)->value; in TEST_F()
952 ASSERT_TRUE(test_alu(val->parent_instr, nir_op_ior)); in TEST_F()
953 nir_ssa_def *low = nir_instr_as_alu(val->parent_instr)->src[0].src.ssa; in TEST_F()
[all …]
/third_party/mesa3d/src/panfrost/util/
Dnir_mod_helpers.c42 if (!src->src.is_ssa || src->src.ssa->parent_instr->type != nir_instr_type_alu) in pan_has_source_mod()
45 nir_alu_instr *alu = nir_instr_as_alu(src->src.ssa->parent_instr); in pan_has_source_mod()
100 nir_instr *parent = use->parent_instr; in pan_has_dest_mod()

123456