Lines Matching defs:instr

114    nir_foreach_instr(instr, succ) {
115 if (instr->type != nir_instr_type_phi)
117 nir_phi_instr *phi = nir_instr_as_phi(instr);
123 nir_foreach_instr(instr, succ) {
124 if (instr->type != nir_instr_type_phi)
126 nir_phi_instr *phi = nir_instr_as_phi(instr);
187 nir_foreach_instr_reverse(instr, block) {
192 if (instr->type == nir_instr_type_phi)
195 nir_foreach_ssa_def(instr, set_ssa_def_dead, block->live_in);
196 nir_foreach_src(instr, set_src_live, block->live_in);
236 if (cursor.instr == nir_block_first_instr(cursor.instr->block))
237 return cursor.instr->block->live_in;
241 if (cursor.instr == nir_block_last_instr(cursor.instr->block))
242 return cursor.instr->block->live_out;
251 nir_foreach_instr_reverse(instr, block) {
252 if (cursor.option == nir_cursor_after_instr && instr == cursor.instr)
259 assert(instr->type != nir_instr_type_phi);
260 if (instr->type == nir_instr_type_phi)
263 nir_foreach_ssa_def(instr, set_ssa_def_dead, live);
264 nir_foreach_src(instr, set_src_live, live);
266 if (cursor.option == nir_cursor_before_instr && instr == cursor.instr)
285 nir_instr *instr = exec_node_data(nir_instr, node, node);
286 if (!nir_foreach_src(instr, src_does_not_use_def, def))
302 /* Returns true if def is live at instr assuming that def comes before
303 * instr in a pre DFS search of the dominance tree.
306 nir_ssa_def_is_live_at(nir_ssa_def *def, nir_instr *instr)
308 if (BITSET_TEST(instr->block->live_out, def->index)) {
309 /* Since def dominates instr, if def is in the liveout of the block,
310 * it's live at instr
314 if (BITSET_TEST(instr->block->live_in, def->index) ||
315 def->parent_instr->block == instr->block) {
316 /* In this case it is either live coming into instr's block or it
318 * see if it is used after instr.
320 return search_for_use_after_instr(instr, def);