/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_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_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_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() 196 foreach_list_typed(nir_cf_node, cf_node, node, entry_list) { in opt_peel_loop_initial_if() 197 nir_foreach_block_in_cf_node(block, cf_node) { in opt_peel_loop_initial_if() 209 nir_cf_node_get_function(&loop->cf_node)); in opt_peel_loop_initial_if() 218 nir_cf_node_as_block(nir_cf_node_next(&nif->cf_node)); in opt_peel_loop_initial_if() 227 nir_foreach_block_in_cf_node(block, &nif->cf_node) in opt_peel_loop_initial_if() 234 nir_cf_list_clone(&tmp, &header, &loop->cf_node, NULL); in opt_peel_loop_initial_if() 235 nir_cf_reinsert(&tmp, nir_before_cf_node(&loop->cf_node)); in opt_peel_loop_initial_if() [all …]
|
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() 295 if (node_is_dead(&following_if->cf_node)) { in dead_cf_block() 296 nir_cf_node_remove(&following_if->cf_node); in dead_cf_block() 305 if (!node_is_dead(&following_loop->cf_node)) in dead_cf_block() 308 nir_cf_node_remove(&following_loop->cf_node); in dead_cf_block() [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() 262 nir_if *if_stmt = nir_cf_node_as_if(cf_node); in gather_vars_written() 266 foreach_list_typed_safe(nir_cf_node, cf_node, node, &if_stmt->then_list) in gather_vars_written() 267 gather_vars_written(state, new_written, cf_node); in gather_vars_written() 269 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_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_builder.c | 318 nir_builder_is_inside_cf(nir_builder *build, nir_cf_node *cf_node) in nir_builder_is_inside_cf() argument 321 for (nir_cf_node *n = &block->cf_node; n; n = n->parent) { in nir_builder_is_inside_cf() 322 if (n == cf_node) in nir_builder_is_inside_cf() 333 nir_builder_cf_insert(build, &nif->cf_node); in nir_push_if_src() 348 assert(nir_builder_is_inside_cf(build, &nif->cf_node)); in nir_push_else() 351 nif = nir_cf_node_as_if(block->cf_node.parent); in nir_push_else() 361 assert(nir_builder_is_inside_cf(build, &nif->cf_node)); in nir_pop_if() 364 nif = nir_cf_node_as_if(block->cf_node.parent); in nir_pop_if() 366 build->cursor = nir_after_cf_node(&nif->cf_node); in nir_pop_if() 373 nir_if *nif = nir_cf_node_as_if(nir_cf_node_prev(&block->cf_node)); in nir_if_phi() [all …]
|
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 | 276 if (if_stmt->cf_node.parent->type != nir_cf_node_if) in nir_opt_collapse_if() 279 nir_if *parent_if = nir_cf_node_as_if(if_stmt->cf_node.parent); in nir_opt_collapse_if() 358 nir_builder_init(&b, nir_cf_node_get_function(&if_stmt->cf_node)->function->impl); in nir_opt_collapse_if() 359 b.cursor = nir_before_cf_node(&if_stmt->cf_node); in nir_opt_collapse_if() 368 nir_cf_reinsert(&tmp, nir_before_cf_node(&parent_if->cf_node)); in nir_opt_collapse_if() 379 if (nir_cf_node_is_first(&block->cf_node)) in nir_opt_peephole_select_block() 382 nir_cf_node *prev_node = nir_cf_node_prev(&block->cf_node); in nir_opt_peephole_select_block() 485 nir_cf_node_remove(&if_stmt->cf_node); in nir_opt_peephole_select_block()
|
D | nir_lower_shader_calls.c | 638 for (nir_cf_node *node = resume_instr->block->cf_node.parent; in duplicate_loop_bodies() 674 nir_cf_node_as_block(nir_cf_node_next(&loop->cf_node))); in duplicate_loop_bodies() 681 nir_cf_node_insert(nir_after_cf_list(&loop->body), &_if->cf_node); in duplicate_loop_bodies() 684 nir_cf_list_clone(&clone, &cf_list, &loop->cf_node, NULL); in duplicate_loop_bodies() 702 for (nir_cf_node *n = &block->cf_node; n != NULL; n = n->parent) { in cf_node_contains_block() 842 assert(nir_cf_node_is_first(&block->cf_node)); in flatten_resume_if_ladder() 876 if (cf_node_contains_block(&_if->cf_node, in flatten_resume_if_ladder() 887 if (flatten_resume_if_ladder(b, &_if->cf_node, &_if->then_list, in flatten_resume_if_ladder() 895 if (flatten_resume_if_ladder(b, &_if->cf_node, &_if->else_list, in flatten_resume_if_ladder() 909 if (cf_node_contains_block(&loop->cf_node, resume_instr->block)) { in flatten_resume_if_ladder() [all …]
|
D | nir_opt_sink.c | 91 nir_block *before = nir_cf_node_as_block(nir_cf_node_prev(&loop->cf_node)); in loop_contains_block() 92 nir_block *after = nir_cf_node_as_block(nir_cf_node_next(&loop->cf_node)); in loop_contains_block() 109 def_loop = get_innermost_loop(&def_block->cf_node); in adjust_block_for_loops() 119 nir_cf_node *next = nir_cf_node_next(&cur_block->cf_node); in adjust_block_for_loops() 169 nir_cf_node_as_block(nir_cf_node_prev(&use->parent_if->cf_node)); in get_preferred_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.c | 544 cf_init(&impl->cf_node, nir_cf_node_function); in nir_function_impl_create_bare() 558 start_block->cf_node.parent = &impl->cf_node; in nir_function_impl_create_bare() 559 end_block->cf_node.parent = &impl->cf_node; in nir_function_impl_create_bare() 562 exec_list_push_tail(&impl->body, &start_block->cf_node.node); in nir_function_impl_create_bare() 587 cf_init(&block->cf_node, nir_cf_node_block); in nir_block_create() 623 cf_init(&if_stmt->cf_node, nir_cf_node_if); in nir_if_create() 628 exec_list_push_tail(&if_stmt->then_list, &then->cf_node.node); in nir_if_create() 629 then->cf_node.parent = &if_stmt->cf_node; in nir_if_create() 633 exec_list_push_tail(&if_stmt->else_list, &else_stmt->cf_node.node); in nir_if_create() 634 else_stmt->cf_node.parent = &if_stmt->cf_node; in nir_if_create() [all …]
|
D | nir_validate.c | 1041 nir_cf_node_as_block(nir_cf_node_next(&state->loop->cf_node)); in validate_jump_instr() 1249 validate_assert(state, block->cf_node.parent == state->parent_node); in validate_block() 1270 nir_cf_node *next = nir_cf_node_next(&block->cf_node); in validate_block() 1322 validate_assert(state, block->cf_node.parent == &state->impl->cf_node); in validate_end_block() 1339 validate_assert(state, !exec_node_is_head_sentinel(if_stmt->cf_node.node.prev)); in validate_if() 1340 nir_cf_node *prev_node = nir_cf_node_prev(&if_stmt->cf_node); in validate_if() 1343 validate_assert(state, !exec_node_is_tail_sentinel(if_stmt->cf_node.node.next)); in validate_if() 1344 nir_cf_node *next_node = nir_cf_node_next(&if_stmt->cf_node); in validate_if() 1353 state->parent_node = &if_stmt->cf_node; in validate_if() 1355 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 …]
|
/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()
|
/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()
|