Lines Matching defs:instr
44 nir_instr *instr;
308 nir_instr *instr = nir_block_first_instr(block->successors[0]);
309 if (instr && instr->type == nir_instr_type_phi)
314 nir_instr *instr = nir_block_first_instr(block->successors[1]);
315 if (instr && instr->type == nir_instr_type_phi)
327 nir_instr_insert(nir_after_block_before_jump(block), &pcopy->instr);
384 nir_foreach_instr(instr, block) {
386 if (instr->type != nir_instr_type_phi)
389 last_phi_instr = instr;
401 nir_instr_insert_after(last_phi_instr, &block_pcopy->instr);
403 nir_foreach_instr(instr, block) {
405 if (instr->type != nir_instr_type_phi)
408 nir_phi_instr *phi = nir_instr_as_phi(instr);
420 nir_ssa_dest_init(&pcopy->instr, &entry->dest,
427 nir_instr_rewrite_src(&pcopy->instr, &entry->src, src->src);
429 nir_instr_rewrite_src(&phi->instr, &src->src,
435 nir_ssa_dest_init(&block_pcopy->instr, &entry->dest,
444 nir_instr_rewrite_src(&block_pcopy->instr, &entry->src,
454 nir_foreach_instr(instr, block) {
456 if (instr->type != nir_instr_type_phi)
459 nir_phi_instr *phi = nir_instr_as_phi(instr);
517 nir_foreach_instr(instr, block) {
519 if (instr->type != nir_instr_type_phi) {
520 if (instr->type != nir_instr_type_parallel_copy)
523 start_pcopy = nir_instr_as_parallel_copy(instr);
608 nir_instr_rewrite_dest(state->instr, dest, nir_dest_for_reg(reg));
619 nir_foreach_instr_safe(instr, block) {
620 state->instr = instr;
621 nir_foreach_ssa_def(instr, rewrite_ssa_def, state);
623 if (instr->type == nir_instr_type_phi) {
624 nir_instr_remove(instr);
625 exec_list_push_tail(&state->dead_instrs, &instr->node);
629 state->instr = NULL;
651 nir_builder_instr_insert(b, &mov->instr);
691 nir_instr_remove(&pcopy->instr);
692 exec_list_push_tail(&state->dead_instrs, &pcopy->instr.node);
709 state->builder.cursor = nir_before_instr(&pcopy->instr);
834 nir_instr_remove(&pcopy->instr);
835 exec_list_push_tail(&state->dead_instrs, &pcopy->instr.node);
1015 nir_foreach_instr_safe(instr, block) {
1016 if (instr->type != nir_instr_type_phi)
1019 nir_phi_instr *phi = nir_instr_as_phi(instr);
1024 b.cursor = nir_after_instr(&phi->instr);
1042 nir_instr_remove(&phi->instr);
1069 nir_instr *instr = dest->ssa.parent_instr;
1071 dest->reg.parent_instr = instr;
1114 nir_foreach_instr(instr, block) {
1115 if (instr->type == nir_instr_type_ssa_undef) {
1117 nir_ssa_undef_instr *undef = nir_instr_as_ssa_undef(instr);
1120 } else if (instr->type == nir_instr_type_load_const) {
1122 nir_load_const_instr *load = nir_instr_as_load_const(instr);
1130 nir_instr_insert(nir_after_instr(&load->instr), &mov->instr);
1131 } else if (nir_foreach_ssa_def(instr, ssa_def_is_local_to_block, NULL)) {
1137 nir_foreach_dest(instr, dest_replace_ssa_with_reg, &state);