Lines Matching defs:phi

40    /* Worklist for phi adding */
57 /* The list of phi nodes associated with this value. Phi nodes are not
71 * - NEEDS_PHI. Indicates that the block may need a phi node but none has
72 * been created yet. If a def is requested for a block, a phi will need
75 * - A regular SSA def. This will be either the result of a phi node or
149 * phi nodes. Of course, we couldn't place those phi nodes
157 /* Instead of creating a phi node immediately, we simply set the
158 * value to the magic value NEEDS_PHI. Later, we create phi nodes
216 /* The magic value NEEDS_PHI indicates that the block needs a phi node
220 * Because a phi node may use SSA defs that it does not dominate (this
222 * fill out the phi node. Instead, the phi nodes we create here will be
225 * over all of the phi instructions, fill out the sources lists, and
228 * Creating phi nodes on-demand allows us to avoid creating dead phi
230 * big win for a full into-SSA pass, other users may use the phi builder
231 * to make small SSA form repairs where most of the phi nodes will never
234 nir_phi_instr *phi = nir_phi_instr_create(val->builder->shader);
235 nir_ssa_dest_init(&phi->instr, &phi->dest, val->num_components,
237 phi->instr.block = dom;
238 exec_list_push_tail(&val->phis, &phi->instr.node);
239 def = &phi->dest.ssa;
243 * phi node created by the case above or one passed to us through
254 * 2) To avoid unneeded recreation of phi nodes and undefs.
270 /* We treat the linked list of phi nodes like a worklist. The list is
272 * create phi nodes. As we fill in the sources of phi nodes, more may
275 * Because we are adding and removing phi nodes from the list as we go,
281 nir_phi_instr *phi = exec_node_data(nir_phi_instr, head, instr.node);
282 assert(phi->instr.type == nir_instr_type_phi);
284 exec_node_remove(&phi->instr.node);
287 nir_block **preds = nir_block_get_predecessors_sorted(phi->instr.block, pb);
289 for (unsigned i = 0; i < phi->instr.block->predecessors->entries; i++) {
290 nir_phi_instr_add_src(phi, preds[i],
296 nir_instr_insert(nir_before_block(phi->instr.block), &phi->instr);