/third_party/mesa3d/src/compiler/nir/ |
D | nir_opt_loop_unroll.c | 53 nir_cf_node_get_function(&loop->cf_node)); in loop_prepare_for_unroll() 66 nir_cf_node_as_block(nir_cf_node_next(&loop->cf_node)); in loop_prepare_for_unroll() 138 nir_after_cf_node(&terminator->nif->cf_node)); in simple_unroll() 140 nir_cf_node_remove(&terminator->nif->cf_node); in simple_unroll() 153 nir_before_cf_node(&limiting_term->nif->cf_node)); in simple_unroll() 161 nir_after_cf_node(&limiting_term->nif->cf_node)); in simple_unroll() 165 nir_cf_extract(&loop_body, nir_after_cf_node(&limiting_term->nif->cf_node), in simple_unroll() 171 nir_cf_list_clone_and_reinsert(&lp_header, loop->cf_node.parent, in simple_unroll() 172 nir_before_cf_node(&loop->cf_node), in simple_unroll() 177 nir_cf_list_clone_and_reinsert(&loop_body, loop->cf_node.parent, in simple_unroll() [all …]
|
D | nir_sweep.c | 41 static void sweep_cf_node(nir_shader *nir, nir_cf_node *cf_node); 68 foreach_list_typed(nir_cf_node, cf_node, node, &iff->then_list) { in sweep_if() 69 sweep_cf_node(nir, cf_node); in sweep_if() 72 foreach_list_typed(nir_cf_node, cf_node, node, &iff->else_list) { in sweep_if() 73 sweep_cf_node(nir, cf_node); in sweep_if() 82 foreach_list_typed(nir_cf_node, cf_node, node, &loop->body) { in sweep_loop() 83 sweep_cf_node(nir, cf_node); in sweep_loop() 88 sweep_cf_node(nir_shader *nir, nir_cf_node *cf_node) in sweep_cf_node() argument 90 switch (cf_node->type) { in sweep_cf_node() 92 sweep_block(nir, nir_cf_node_as_block(cf_node)); in sweep_cf_node() [all …]
|
D | nir_control_flow.c | 189 new_block->cf_node.parent = block->cf_node.parent; in split_block_beginning() 190 exec_node_insert_node_before(&block->cf_node.node, &new_block->cf_node.node); in split_block_beginning() 232 nir_function_impl *impl = nir_cf_node_get_function(&block->cf_node); in nir_insert_phi_undef() 281 if (exec_node_is_tail_sentinel(block->cf_node.node.next)) { in block_add_normal_succs() 282 nir_cf_node *parent = block->cf_node.parent; in block_add_normal_succs() 300 nir_cf_node *next = nir_cf_node_next(&block->cf_node); in block_add_normal_succs() 323 new_block->cf_node.parent = block->cf_node.parent; in split_block_end() 324 exec_node_insert_after(&block->cf_node.node, &new_block->cf_node.node); in split_block_end() 414 node->parent = before->cf_node.parent; in insert_non_block() 415 exec_node_insert_after(&before->cf_node.node, &node->node); in insert_non_block() [all …]
|
D | nir_lower_memory_model.c | 195 lower_make_visible(nir_cf_node *cf_node, uint32_t *cur_modes) in lower_make_visible() argument 198 switch (cf_node->type) { in lower_make_visible() 200 nir_block *block = nir_cf_node_as_block(cf_node); in lower_make_visible() 206 nir_if *nif = nir_cf_node_as_if(cf_node); in lower_make_visible() 217 nir_loop *loop = nir_cf_node_as_loop(cf_node); in lower_make_visible() 234 lower_make_available(nir_cf_node *cf_node, uint32_t *cur_modes) in lower_make_available() argument 237 switch (cf_node->type) { in lower_make_available() 239 nir_block *block = nir_cf_node_as_block(cf_node); in lower_make_available() 245 nir_if *nif = nir_cf_node_as_if(cf_node); in lower_make_available() 256 nir_loop *loop = nir_cf_node_as_loop(cf_node); in lower_make_available() [all …]
|
D | nir_to_lcssa.c | 62 nir_cf_node_as_block(nir_cf_node_prev(&loop->cf_node)); in is_if_use_inside_loop() 64 nir_cf_node_as_block(nir_cf_node_next(&loop->cf_node)); in is_if_use_inside_loop() 67 nir_cf_node_as_block(nir_cf_node_prev(&use->parent_if->cf_node)); in is_if_use_inside_loop() 80 nir_cf_node_as_block(nir_cf_node_prev(&loop->cf_node)); in is_use_inside_loop() 82 nir_cf_node_as_block(nir_cf_node_next(&loop->cf_node)); in is_use_inside_loop() 97 nir_cf_node_as_block(nir_cf_node_prev(&loop->cf_node)); in is_defined_before_loop() 147 nir_cf_node *prev = nir_cf_node_prev(&instr->instr.block->cf_node); in phi_is_invariant() 290 nir_cf_node_as_block(nir_cf_node_next(&loop->cf_node)); in setup_loop_state() 297 convert_to_lcssa(nir_cf_node *cf_node, lcssa_state *state) in convert_to_lcssa() argument 299 switch (cf_node->type) { in convert_to_lcssa() [all …]
|
D | nir_opt_if.c | 43 nir_cf_node_as_block(nir_cf_node_prev(&loop->cf_node)); in find_continue_block() 143 nir_cf_node_as_block(nir_cf_node_prev(&loop->cf_node)); in opt_peel_loop_initial_if() 155 nir_cf_node *if_node = nir_cf_node_next(&header_block->cf_node); in opt_peel_loop_initial_if() 195 foreach_list_typed(nir_cf_node, cf_node, node, entry_list) { in opt_peel_loop_initial_if() 196 nir_foreach_block_in_cf_node(block, cf_node) { in opt_peel_loop_initial_if() 208 nir_cf_node_get_function(&loop->cf_node)); in opt_peel_loop_initial_if() 217 nir_cf_node_as_block(nir_cf_node_next(&nif->cf_node)); in opt_peel_loop_initial_if() 226 nir_foreach_block_in_cf_node(block, &nif->cf_node) in opt_peel_loop_initial_if() 233 nir_cf_list_clone(&tmp, &header, &loop->cf_node, NULL); in opt_peel_loop_initial_if() 234 nir_cf_reinsert(&tmp, nir_before_cf_node(&loop->cf_node)); in opt_peel_loop_initial_if() [all …]
|
D | nir_opt_copy_prop_vars.c | 135 nir_cf_node *cf_node) in gather_vars_written() argument 139 switch (cf_node->type) { in gather_vars_written() 141 nir_function_impl *impl = nir_cf_node_as_function(cf_node); in gather_vars_written() 142 foreach_list_typed_safe(nir_cf_node, cf_node, node, &impl->body) in gather_vars_written() 143 gather_vars_written(state, NULL, cf_node); in gather_vars_written() 151 nir_block *block = nir_cf_node_as_block(cf_node); in gather_vars_written() 263 nir_if *if_stmt = nir_cf_node_as_if(cf_node); in gather_vars_written() 267 foreach_list_typed_safe(nir_cf_node, cf_node, node, &if_stmt->then_list) in gather_vars_written() 268 gather_vars_written(state, new_written, cf_node); in gather_vars_written() 270 foreach_list_typed_safe(nir_cf_node, cf_node, node, &if_stmt->else_list) in gather_vars_written() [all …]
|
D | nir_opt_trivial_continues.c | 42 nir_cf_node *prev_node = nir_cf_node_prev(&block->cf_node); in lower_trivial_continues_block() 78 foreach_list_typed(nir_cf_node, cf_node, node, cf_list) { in lower_trivial_continues_list() 80 &cf_node->node == exec_list_get_tail(cf_list); in lower_trivial_continues_list() 81 switch (cf_node->type) { in lower_trivial_continues_list() 86 nir_if *nif = nir_cf_node_as_if(cf_node); in lower_trivial_continues_list() 95 nir_loop *loop = nir_cf_node_as_loop(cf_node); in lower_trivial_continues_list()
|
D | nir_opt_dead_cf.c | 89 nir_block *after = nir_cf_node_as_block(nir_cf_node_next(&if_stmt->cf_node)); in opt_constant_if() 122 remove_after_cf_node(&if_stmt->cf_node); in opt_constant_if() 131 nir_cf_reinsert(&list, nir_after_cf_node(&if_stmt->cf_node)); in opt_constant_if() 132 nir_cf_node_remove(&if_stmt->cf_node); in opt_constant_if() 166 nir_cf_node_as_block(nir_cf_node_prev(&use->parent_if->cf_node)); in def_only_used_in_cf_node() 211 for (nir_cf_node *n = &block->cf_node; in node_is_dead() 300 if (!node_is_dead(&following_loop->cf_node)) in dead_cf_block() 303 nir_cf_node_remove(&following_loop->cf_node); in dead_cf_block() 360 !exec_node_is_tail_sentinel(next->cf_node.node.next)) { in dead_cf_list() 377 !exec_node_is_tail_sentinel(next->cf_node.node.next))) { in dead_cf_list()
|
D | nir_opt_dce.c | 152 foreach_list_typed_reverse(nir_cf_node, cf_node, node, cf_list) { in dce_cf_list() 153 switch (cf_node->type) { in dce_cf_list() 155 nir_block *block = nir_cf_node_as_block(cf_node); in dce_cf_list() 160 nir_if *nif = nir_cf_node_as_if(cf_node); in dce_cf_list() 167 nir_loop *loop = nir_cf_node_as_loop(cf_node); in dce_cf_list() 170 inner_state.preheader = nir_cf_node_as_block(nir_cf_node_prev(cf_node)); in dce_cf_list() 198 nir_foreach_block_in_cf_node(block, cf_node) { in dce_cf_list()
|
D | nir_dominance.c | 229 assert(nir_cf_node_get_function(&b1->cf_node) == in nir_dominance_lca() 230 nir_cf_node_get_function(&b2->cf_node)); in nir_dominance_lca() 232 assert(nir_cf_node_get_function(&b1->cf_node)->valid_metadata & in nir_dominance_lca() 252 assert(nir_cf_node_get_function(&parent->cf_node) == in nir_block_dominates() 253 nir_cf_node_get_function(&child->cf_node)); in nir_block_dominates() 255 assert(nir_cf_node_get_function(&parent->cf_node)->valid_metadata & in nir_block_dominates() 269 assert(nir_cf_node_get_function(&block->cf_node)->valid_metadata & in nir_block_is_unreachable() 271 assert(nir_cf_node_get_function(&block->cf_node)->valid_metadata & in nir_block_is_unreachable()
|
D | nir_lower_returns.c | 73 nir_cf_extract(&list, nir_after_cf_node(&if_stmt->cf_node), in predicate_following() 96 predicate_following(&loop->cf_node, state); in lower_returns_in_loop() 127 predicate_following(&if_stmt->cf_node, state); in lower_returns_in_if() 137 nir_block *succ_block = nir_after_cf_node(&if_stmt->cf_node).block; in lower_returns_in_if() 143 nir_cf_extract(&list, nir_after_cf_node(&if_stmt->cf_node), in lower_returns_in_if() 169 nir_cf_extract(&list, nir_before_cf_node(&block->cf_node), in lower_returns_in_block() 225 assert(nir_cf_node_next(&block->cf_node) == NULL); in lower_returns_in_block()
|
D | nir_opt_peephole_select.c | 274 if (if_stmt->cf_node.parent->type != nir_cf_node_if) in nir_opt_collapse_if() 277 nir_if *parent_if = nir_cf_node_as_if(if_stmt->cf_node.parent); in nir_opt_collapse_if() 356 nir_builder_init(&b, nir_cf_node_get_function(&if_stmt->cf_node)->function->impl); in nir_opt_collapse_if() 357 b.cursor = nir_before_cf_node(&if_stmt->cf_node); in nir_opt_collapse_if() 366 nir_cf_reinsert(&tmp, nir_before_cf_node(&parent_if->cf_node)); in nir_opt_collapse_if() 377 if (nir_cf_node_is_first(&block->cf_node)) in nir_opt_peephole_select_block() 380 nir_cf_node *prev_node = nir_cf_node_prev(&block->cf_node); in nir_opt_peephole_select_block() 483 nir_cf_node_remove(&if_stmt->cf_node); in nir_opt_peephole_select_block()
|
D | nir_opt_conditional_discard.c | 38 if (nir_cf_node_is_first(&block->cf_node)) in nir_opt_conditional_discard_block() 41 nir_cf_node *prev_node = nir_cf_node_prev(&block->cf_node); 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() 117 nir_cf_node_remove(&if_stmt->cf_node); in nir_opt_conditional_discard_block()
|
D | nir_opt_sink.c | 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() 106 def_loop = get_innermost_loop(&def_block->cf_node); in adjust_block_for_loops() 116 nir_cf_node *next = nir_cf_node_next(&cur_block->cf_node); in adjust_block_for_loops() 166 nir_cf_node_as_block(nir_cf_node_prev(&use->parent_if->cf_node)); in get_preferred_block()
|
D | nir.c | 455 cf_init(&impl->cf_node, nir_cf_node_function); in nir_function_impl_create_bare() 469 start_block->cf_node.parent = &impl->cf_node; in nir_function_impl_create_bare() 470 end_block->cf_node.parent = &impl->cf_node; in nir_function_impl_create_bare() 473 exec_list_push_tail(&impl->body, &start_block->cf_node.node); in nir_function_impl_create_bare() 498 cf_init(&block->cf_node, nir_cf_node_block); in nir_block_create() 534 cf_init(&if_stmt->cf_node, nir_cf_node_if); in nir_if_create() 539 exec_list_push_tail(&if_stmt->then_list, &then->cf_node.node); in nir_if_create() 540 then->cf_node.parent = &if_stmt->cf_node; in nir_if_create() 544 exec_list_push_tail(&if_stmt->else_list, &else_stmt->cf_node.node); in nir_if_create() 545 else_stmt->cf_node.parent = &if_stmt->cf_node; in nir_if_create() [all …]
|
D | nir_validate.c | 1029 nir_cf_node_as_block(nir_cf_node_next(&state->loop->cf_node)); in validate_jump_instr() 1236 validate_assert(state, block->cf_node.parent == state->parent_node); in validate_block() 1257 nir_cf_node *next = nir_cf_node_next(&block->cf_node); in validate_block() 1309 validate_assert(state, block->cf_node.parent == &state->impl->cf_node); in validate_end_block() 1326 validate_assert(state, !exec_node_is_head_sentinel(if_stmt->cf_node.node.prev)); in validate_if() 1327 nir_cf_node *prev_node = nir_cf_node_prev(&if_stmt->cf_node); in validate_if() 1330 validate_assert(state, !exec_node_is_tail_sentinel(if_stmt->cf_node.node.next)); in validate_if() 1331 nir_cf_node *next_node = nir_cf_node_next(&if_stmt->cf_node); in validate_if() 1340 state->parent_node = &if_stmt->cf_node; in validate_if() 1342 foreach_list_typed(nir_cf_node, cf_node, node, &if_stmt->then_list) { in validate_if() [all …]
|
/third_party/mesa3d/src/gallium/drivers/r600/sb/ |
D | sb_bc_finalize.cpp | 79 cf_node *c = sh.create_clause(NST_ALU_CLAUSE); in run() 105 cf_node *c = sh.create_cf(CF_OP_CF_END); in run() 113 cf_node *le = last_export[t]; in run() 127 cf_node *loop_start = sh.create_cf(CF_OP_LOOP_START_DX10); in finalize_loop() 128 cf_node *loop_end = sh.create_cf(CF_OP_LOOP_END); in finalize_loop() 144 cf_node *loop_break = sh.create_cf(CF_OP_LOOP_BREAK); in finalize_loop() 155 cf_node *loop_cont = sh.create_cf(CF_OP_LOOP_CONTINUE); in finalize_loop() 199 cf_node *if_jump = sh.create_cf(CF_OP_JUMP); in finalize_if() 200 cf_node *if_pop = sh.create_cf(CF_OP_POP); in finalize_if() 231 cf_node *nelse = sh.create_cf(CF_OP_ELSE); in finalize_if() [all …]
|
D | sb_bc.h | 46 class cf_node; variable 885 typedef std::vector<cf_node*> id_cf_map; 917 int decode_alu_clause(cf_node *cf); 918 int decode_alu_group(cf_node* cf, unsigned &i, unsigned &gcnt); 920 int decode_fetch_clause(cf_node *cf); 923 int prepare_alu_clause(cf_node *cf); 924 int prepare_alu_group(cf_node* cf, alu_group_node *g); 925 int prepare_fetch_clause(cf_node *cf); 927 int prepare_loop(cf_node *c); 928 int prepare_if(cf_node *c); [all …]
|
D | sb_pass.h | 62 virtual bool visit(cf_node &n, bool enter); 107 virtual bool visit(cf_node &n, bool enter); 113 void dump(cf_node& n); 133 virtual bool visit(cf_node &n, bool enter); 180 virtual bool visit(cf_node &n, bool enter); 322 virtual bool visit(cf_node &n, bool enter); 376 virtual bool visit(cf_node &n, bool enter); 602 virtual bool visit(cf_node &n, bool enter); 655 virtual bool visit(cf_node &n, bool enter); 690 cf_node *last_export[EXP_TYPE_COUNT]; [all …]
|
D | sb_bc_parser.cpp | 208 cf_node *cf = sh->create_cf(); in decode_cf() 249 int bc_parser::decode_alu_clause(cf_node* cf) { in decode_alu_clause() 269 int bc_parser::decode_alu_group(cf_node* cf, unsigned &i, unsigned &gcnt) { in decode_alu_group() 331 int bc_parser::prepare_alu_clause(cf_node* cf) { in prepare_alu_clause() 366 int bc_parser::prepare_alu_group(cf_node* cf, alu_group_node *g) { in prepare_alu_group() 628 int bc_parser::decode_fetch_clause(cf_node* cf) { in decode_fetch_clause() 649 int bc_parser::prepare_fetch_clause(cf_node *cf) { in prepare_fetch_clause() 753 cf_node *c = *I; in prepare_ir() 826 cf_node *cf_next = sh->create_cf(); in prepare_ir() 894 cf_node *cf_next = sh->create_cf(); in prepare_ir() [all …]
|
D | sb_shader.cpp | 85 cf_node* shader::create_clause(node_subtype nst) { in create_clause() 86 cf_node *n = create_cf(); in create_clause() 216 void shader::init_call_fs(cf_node* cf) { in init_call_fs() 283 cf_node* shader::create_cf() { in create_cf() 284 cf_node* n = new (pool.allocate(sizeof(cf_node))) cf_node(); in create_cf() 418 cf_node* shader::create_cf(unsigned op) { in create_cf() 419 cf_node *c = create_cf(); in create_cf()
|
/third_party/mesa3d/src/compiler/nir/tests/ |
D | control_flow_tests.cpp | 56 nir_cf_node_insert(nir_after_cf_list(&b.impl->body), &loop->cf_node); in TEST_F() 83 nir_block *block_2 = nir_cf_node_as_block(nir_cf_node_next(&loop->cf_node)); in TEST_F() 85 ASSERT_EQ(nir_cf_node_block, block_0->cf_node.type); in TEST_F() 86 ASSERT_EQ(nir_cf_node_block, block_1->cf_node.type); in TEST_F() 87 ASSERT_EQ(nir_cf_node_block, block_2->cf_node.type); in TEST_F() 88 ASSERT_EQ(nir_cf_node_block, block_3->cf_node.type); in TEST_F()
|
D | lower_returns_tests.cpp | 114 bld.cursor = nir_after_cf_node_and_phis(&loop->cf_node); in TEST_F() 188 bld.cursor = nir_after_cf_node_and_phis(&loop_inner->cf_node); in TEST_F() 194 bld.cursor = nir_after_cf_node_and_phis(&loop_outer->cf_node); in TEST_F()
|
/third_party/mesa3d/src/intel/compiler/ |
D | brw_nir_lower_alpha_to_coverage.c | 109 assert(block->cf_node.parent == &impl->cf_node); in brw_nir_lower_alpha_to_coverage() 110 assert(nir_cf_node_is_last(&block->cf_node)); in brw_nir_lower_alpha_to_coverage()
|