Home
last modified time | relevance | path

Searched refs:nir_block (Results 1 – 25 of 133) sorted by relevance

123456

/third_party/mesa3d/src/compiler/nir/
Dnir_control_flow.c49 block_add_pred(nir_block *block, nir_block *pred) in block_add_pred()
55 block_remove_pred(nir_block *block, nir_block *pred) in block_remove_pred()
65 link_blocks(nir_block *pred, nir_block *succ1, nir_block *succ2) in link_blocks()
77 unlink_blocks(nir_block *pred, nir_block *succ) in unlink_blocks()
91 unlink_block_successors(nir_block *block) in unlink_block_successors()
100 link_non_block_to_block(nir_cf_node *node, nir_block *block) in link_non_block_to_block()
110 nir_block *last_then_block = nir_if_last_then_block(if_stmt); in link_non_block_to_block()
111 nir_block *last_else_block = nir_if_last_else_block(if_stmt); in link_non_block_to_block()
128 link_block_to_non_block(nir_block *block, nir_cf_node *node) in link_block_to_non_block()
138 nir_block *first_then_block = nir_if_first_then_block(if_stmt); in link_block_to_non_block()
[all …]
Dnir_dominance.c37 init_block(nir_block *block, nir_function_impl *impl) in init_block()
54 static nir_block *
55 intersect(nir_block *b1, nir_block *b2) in intersect()
73 calc_dominance(nir_block *block) in calc_dominance()
75 nir_block *new_idom = NULL; in calc_dominance()
77 nir_block *pred = (nir_block *) entry->key; in calc_dominance()
96 calc_dom_frontier(nir_block *block) in calc_dom_frontier()
100 nir_block *runner = (nir_block *) entry->key; in calc_dom_frontier()
138 block->dom_children = ralloc_array(mem_ctx, nir_block *, in calc_dom_children()
152 calc_dfs_indicies(nir_block *block, uint32_t *index) in calc_dfs_indicies()
[all …]
Dnir_opt_sink.c86 loop_contains_block(nir_loop *loop, nir_block *block) in loop_contains_block()
88 nir_block *before = nir_cf_node_as_block(nir_cf_node_prev(&loop->cf_node)); in loop_contains_block()
89 nir_block *after = nir_cf_node_as_block(nir_cf_node_next(&loop->cf_node)); in loop_contains_block()
100 static nir_block *
101 adjust_block_for_loops(nir_block *use_block, nir_block *def_block, in adjust_block_for_loops()
108 for (nir_block *cur_block = use_block; cur_block != def_block->imm_dom; in adjust_block_for_loops()
135 static nir_block *
138 nir_block *lca = NULL; in get_preferred_block()
142 nir_block *use_block = instr->block; in get_preferred_block()
153 nir_block *phi_lca = NULL; in get_preferred_block()
[all …]
Dnir_opt_if.c38 static nir_block*
41 nir_block *header_block = nir_loop_first_block(loop); in find_continue_block()
42 nir_block *prev_block = in find_continue_block()
49 return (nir_block*)pred_entry->key; in find_continue_block()
60 const nir_block *entry_block, in phi_has_constant_from_outside_and_one_from_inside_loop()
141 nir_block *header_block = nir_loop_first_block(loop); in opt_peel_loop_initial_if()
142 nir_block *const prev_block = in opt_peel_loop_initial_if()
216 nir_block *after_if_block = in opt_peel_loop_initial_if()
243 nir_block_ends_in_jump(exec_node_data(nir_block, in opt_peel_loop_initial_if()
255 nir_block *continue_block = find_continue_block(loop); in opt_peel_loop_initial_if()
[all …]
Dnir_lower_goto_ifs.c84 const nir_block *const *a = _a; in nir_block_ptr_cmp()
85 const nir_block *const *b = _b; in nir_block_ptr_cmp()
98 printf("%u", ((nir_block *)entry->key)->index); in print_block_set()
112 static nir_block **
116 nir_block **block_arr = ralloc_array(mem_ctx, nir_block *, num_blocks); in sorted_block_arr_for_set()
119 block_arr[i++] = (nir_block *)entry->key; in sorted_block_arr_for_set()
125 static nir_block *
129 return (nir_block *)_mesa_set_next_entry(block_set, NULL)->key; in block_for_singular_set()
136 set_path_vars(nir_builder *b, struct path_fork *fork, nir_block *target) in set_path_vars()
162 nir_block *then_block, nir_block *else_block) in set_path_vars_cond()
[all …]
Dnir_worklist.h61 nir_block **blocks;
76 void nir_block_worklist_push_head(nir_block_worklist *w, nir_block *block);
78 nir_block *nir_block_worklist_peek_head(const nir_block_worklist *w);
80 nir_block *nir_block_worklist_pop_head(nir_block_worklist *w);
82 void nir_block_worklist_push_tail(nir_block_worklist *w, nir_block *block);
84 nir_block *nir_block_worklist_peek_tail(const nir_block_worklist *w);
86 nir_block *nir_block_worklist_pop_tail(nir_block_worklist *w);
Dnir_phi_builder.c35 nir_block **blocks;
43 nir_block **W;
102 pb->blocks = ralloc_array(pb, nir_block *, pb->num_blocks); in nir_phi_builder_create()
111 pb->W = ralloc_array(pb, nir_block *, pb->num_blocks); in nir_phi_builder_create()
142 nir_block *cur = pb->W[w_start++]; in nir_phi_builder_add_value()
144 nir_block *next = (nir_block *) dom_entry->key; in nir_phi_builder_add_value()
176 nir_block *block, nir_ssa_def *def) in nir_phi_builder_value_set_block_def()
183 nir_block *block) in nir_phi_builder_value_get_block_def()
188 nir_block *dom = block; in nir_phi_builder_value_get_block_def()
287 nir_block **preds = nir_block_get_predecessors_sorted(phi->instr.block, pb); in nir_phi_builder_finish()
Dnir_worklist.c40 w->blocks = rzalloc_array(mem_ctx, nir_block *, num_blocks); in nir_block_worklist_init()
59 nir_block_worklist_push_head(nir_block_worklist *w, nir_block *block) in nir_block_worklist_push_head()
78 nir_block *
86 nir_block *
101 nir_block_worklist_push_tail(nir_block_worklist *w, nir_block *block) in nir_block_worklist_push_tail()
117 nir_block *
127 nir_block *
Dnir_opt_dead_cf.c89 nir_block *after = nir_cf_node_as_block(nir_cf_node_next(&if_stmt->cf_node)); in opt_constant_if()
90 nir_block *last_block = condition ? nir_if_last_then_block(if_stmt) in opt_constant_if()
141 nir_block *before = nir_cf_node_as_block(nir_cf_node_prev(node)); in def_only_used_in_cf_node()
142 nir_block *after = nir_cf_node_as_block(nir_cf_node_next(node)); in def_only_used_in_cf_node()
165 nir_block *use_block = in def_only_used_in_cf_node()
197 nir_block *after = nir_cf_node_as_block(nir_cf_node_next(node)); in node_is_dead()
285 dead_cf_block(nir_block *block) in dead_cf_block()
318 nir_block *block = nir_cf_node_as_block(cur); in dead_cf_list()
358 nir_block *next = nir_cf_node_as_block(nir_cf_node_next(cur)); in dead_cf_list()
374 nir_block *next = nir_cf_node_as_block(nir_cf_node_next(cur)); in dead_cf_list()
Dnir.h772 struct nir_block *block;
2617 struct nir_block *target;
2618 struct nir_block *else_target;
2632 struct nir_block *pred;
2651 nir_phi_get_src_from_block(nir_phi_instr *phi, struct nir_block *block) in nir_phi_get_src_from_block()
2866 typedef struct nir_block { struct
2878 struct nir_block *successors[2]; argument
2887 struct nir_block *imm_dom; argument
2891 struct nir_block **dom_children; argument
2920 } nir_block; argument
[all …]
Dnir_opt_gcm.c65 nir_block *early_block;
103 nir_block *block = nir_cf_node_as_block(node); in get_loop_instr_count()
137 nir_block *block = nir_cf_node_as_block(node); in gcm_build_block_info()
487 nir_block *block) in set_block_for_loop_instr()
531 static nir_block *
532 gcm_choose_block_for_instr(nir_instr *instr, nir_block *early_block, in gcm_choose_block_for_instr()
533 nir_block *late_block, struct gcm_state *state) in gcm_choose_block_for_instr()
537 nir_block *best = late_block; in gcm_choose_block_for_instr()
538 for (nir_block *block = late_block; block != NULL; block = block->imm_dom) { in gcm_choose_block_for_instr()
568 nir_block *lca = NULL; in gcm_schedule_late_def()
[all …]
Dnir_opt_conditional_discard.c36 nir_opt_conditional_discard_block(nir_builder *b, nir_block *block) in nir_opt_conditional_discard_block()
46 nir_block *then_block = nir_if_first_then_block(if_stmt); in nir_opt_conditional_discard_block()
47 nir_block *else_block = nir_if_first_else_block(if_stmt); in nir_opt_conditional_discard_block()
65 nir_block *after = nir_cf_node_as_block(nir_cf_node_next(&if_stmt->cf_node)); in nir_opt_conditional_discard_block()
Dnir_to_lcssa.c48 nir_block *block_after_loop;
49 nir_block **exit_blocks;
61 nir_block *block_before_loop = in is_if_use_inside_loop()
63 nir_block *block_after_loop = in is_if_use_inside_loop()
66 nir_block *prev_block = in is_if_use_inside_loop()
79 nir_block *block_before_loop = in is_use_inside_loop()
81 nir_block *block_after_loop = in is_use_inside_loop()
96 nir_block *block_before_loop = in is_defined_before_loop()
Dnir_lower_gs_intrinsics.c240 rewrite_intrinsics(nir_block *block, struct state *state) in rewrite_intrinsics()
270 append_set_vertex_and_primitive_count(nir_block *end_block, struct state *state) in append_set_vertex_and_primitive_count()
279 nir_block *pred = (nir_block *) entry->key; in append_set_vertex_and_primitive_count()
319 a_block_needs_set_vertex_and_primitive_count(nir_block *end_block, bool per_stream) in a_block_needs_set_vertex_and_primitive_count()
322 nir_block *pred = (nir_block *) entry->key; in a_block_needs_set_vertex_and_primitive_count()
Dnir_opt_peephole_select.c63 block_check_for_allowed_instrs(nir_block *block, unsigned *count, in block_check_for_allowed_instrs()
299 nir_block *last = nir_if_last_then_block(parent_if); in nir_opt_collapse_if()
330 nir_block *first = nir_if_first_then_block(parent_if); in nir_opt_collapse_if()
373 nir_opt_peephole_select_block(nir_block *block, nir_shader *shader, in nir_opt_peephole_select_block()
384 nir_block *prev_block = nir_cf_node_as_block(nir_cf_node_prev(prev_node)); in nir_opt_peephole_select_block()
405 nir_block *then_block = nir_if_first_then_block(if_stmt); in nir_opt_peephole_select_block()
406 nir_block *else_block = nir_if_first_else_block(if_stmt); in nir_opt_peephole_select_block()
Dnir_liveness.c58 init_liveness_block(nir_block *block, in init_liveness_block()
108 propagate_across_edge(nir_block *pred, nir_block *succ, in propagate_across_edge()
178 nir_block *block = nir_block_worklist_pop_head(&state.worklist); in nir_live_ssa_defs_impl()
205 nir_block *pred = (nir_block *)entry->key; in nir_live_ssa_defs_impl()
224 nir_block *block = nir_cursor_current_block(cursor); in nir_get_live_ssa_defs()
Dnir_opt_loop_unroll.c65 nir_block *block_after_loop = in loop_prepare_for_unroll()
79 nir_block **first_break_block, in get_first_blocks_in_terminator()
80 nir_block **first_continue_block) in get_first_blocks_in_terminator()
125 nir_block *first_break_block; in simple_unroll()
126 nir_block *first_continue_block; in simple_unroll()
144 nir_block *first_break_block; in simple_unroll()
145 nir_block *first_continue_block; in simple_unroll()
150 nir_block *header_blk = nir_loop_first_block(loop); in simple_unroll()
351 nir_block *header_blk = nir_loop_first_block(loop); in complex_unroll()
393 nir_block *first_break_block; in complex_unroll()
[all …]
Dnir_control_flow_private.h38 void nir_handle_add_jump(nir_block *block);
39 void nir_handle_remove_jump(nir_block *block, nir_jump_type type);
Dnir_from_ssa.c304 add_parallel_copy_to_end_of_block(nir_shader *shader, nir_block *block, void *dead_ctx) in add_parallel_copy_to_end_of_block()
334 get_parallel_copy_at_end_of_block(nir_block *block) in get_parallel_copy_at_end_of_block()
381 isolate_phi_nodes_block(nir_shader *shader, nir_block *block, void *dead_ctx) in isolate_phi_nodes_block()
449 coalesce_phi_nodes_block(nir_block *block, struct from_ssa_state *state) in coalesce_phi_nodes_block()
508 aggressive_coalesce_block(nir_block *block, struct from_ssa_state *state) in aggressive_coalesce_block()
611 resolve_registers_block(nir_block *block, struct from_ssa_state *state) in resolve_registers_block()
837 resolve_parallel_copies_block(nir_block *block, struct from_ssa_state *state) in resolve_parallel_copies_block()
938 nir_ssa_def *def, nir_block *block, struct set *visited_blocks) in place_phi_read()
945 nir_block *pred = (nir_block *)entry->key; in place_phi_read()
961 place_phi_read(b, reg, def, (nir_block *)entry->key, visited_blocks); in place_phi_read()
[all …]
Dnir_repair_ssa.c57 static nir_block *
82 nir_block *block_before_if = in repair_ssa_def()
105 nir_block *src_block = get_src_block(src); in repair_ssa_def()
144 nir_block *block_before_if = in repair_ssa_def()
Dnir.c467 nir_block *start_block = nir_block_create(shader); in nir_function_impl_create_bare()
468 nir_block *end_block = nir_block_create(shader); in nir_function_impl_create_bare()
493 nir_block *
496 nir_block *block = rzalloc(shader, nir_block); in nir_block_create()
537 nir_block *then = nir_block_create(shader); in nir_if_create()
542 nir_block *else_stmt = nir_block_create(shader); in nir_if_create()
559 nir_block *body = nir_block_create(shader); in nir_loop_create()
814 nir_phi_instr_add_src(nir_phi_instr *instr, nir_block *pred, nir_src src) in nir_phi_instr_add_src()
1391 nir_foreach_phi_src_leaving_block(nir_block *block, in nir_foreach_phi_src_leaving_block()
1772 nir_block *
[all …]
/third_party/mesa3d/src/gallium/drivers/etnaviv/
Detnaviv_compiler_nir_liveness.c44 nir_block *block; /* current block pointer */
54 init_liveness_block(nir_block *block, in init_liveness_block()
109 propagate_across_edge(nir_block *pred, nir_block *succ, in propagate_across_edge()
181 nir_block *block = nir_block_worklist_pop_head(&state.worklist); in etna_live_defs()
229 nir_block *pred = (nir_block *)entry->key; in etna_live_defs()
/third_party/mesa3d/src/freedreno/ir3/
Dir3_nir_move_varying_inputs.c49 nir_block *start_block;
55 nir_block *start_block;
101 check_precondition_block(precond_state *state, nir_block *block) in check_precondition_block()
153 move_varying_inputs_block(state *state, nir_block *block) in move_varying_inputs_block()
/third_party/mesa3d/src/compiler/nir/tests/
Dcontrol_flow_tests.cpp81 nir_block *block_0 = nir_start_block(b.impl); in TEST_F()
82 nir_block *block_1 = nir_loop_first_block(loop); in TEST_F()
83 nir_block *block_2 = nir_cf_node_as_block(nir_cf_node_next(&loop->cf_node)); in TEST_F()
84 nir_block *block_3 = b.impl->end_block; in TEST_F()
/third_party/mesa3d/src/intel/compiler/
Dbrw_nir_tcs_workarounds.c84 emit_quads_workaround(nir_builder *b, nir_block *block) in emit_quads_workaround()
123 nir_block *end_preds[num_end_preds]; in brw_nir_apply_tcs_quads_workaround()
127 end_preds[i++] = (nir_block *) entry->key; in brw_nir_apply_tcs_quads_workaround()

123456