Lines Matching defs:block

35  * Gets the single block that jumps back to the loop header. Already assumes
36 * there is exactly one such block.
52 unreachable("Continue block not found!");
94 * block block_1:
98 * block block_2:
102 * block block_3:
104 * block block_4:
108 * block block_5:
110 * block block_6:
113 * block block_7:
118 * // Stuff from block 1
119 * // Stuff from block 3
121 * block block_1:
126 * block block_5:
128 * block block_6:
131 * block block_7:
132 * // Stuff from block 1
133 * // Stuff from block 2
148 /* The loop must have exactly one continue block which could be a block
150 * last block in the loop back to the top.
168 if (cond->parent_instr->block != header_block)
197 nir_foreach_block_in_cf_node(block, cf_node) {
198 nir_instr *last_instr = nir_block_last_instr(block);
205 * have deref uses which cross block boundaries. We don't want a deref
220 /* Get rid of phis in the header block since we will be duplicating it */
227 nir_foreach_block_in_cf_node(block, &nif->cf_node)
228 nir_lower_ssa_defs_to_regs_block(block);
251 /* Get continue block again as the previous reinsert might have removed the
252 * block. Also, if both the continue list and the continue block ends in
311 bcsel->src[i].src.ssa->parent_instr->block != instr->block)
333 * ALU instructions in the header block of a loop that meet the following
339 * - At least one source of the instruction is a phi node from the header block.
341 * - Any non-phi sources of the ALU instruction come from a block that
342 * dominates the block before the loop. The most common failure mode for
343 * this check is sources that are generated in the loop header block.
345 * - The phi node selects a constant or undef from the block before the loop or
349 * bottom of the loop and one at the block before the loop. The instruction
352 * on. A new phi node is added to the header block that selects either the
362 * block block_1:
380 * block block_1:
403 /* The loop must have exactly one continue block which could be a block
405 * last block in the loop back to the top.
440 /* If the source is a phi in the loop header block, then the
445 src_instr->block == header_block) {
477 /* If the source is not a phi (or a phi in a block other than the
480 if (!nir_block_dominates(src_instr->block, prev_block)) {
512 * Insert the new instruction at the end of the continue block.
551 * Simplify a bcsel whose sources are all phi nodes from the loop header block
559 * - All of the sources of the bcsel are phi nodes in the header block of the
567 * from the continue block. Since each of these sources is also a phi node in
568 * the header block, the value of the phi node can be "evaluated." These
580 * block block_1:
602 * block block_1:
620 * (since it will become the source of a phi node in the header block of the
634 /* The loop must have exactly one continue block which could be a block
636 * last block in the loop back to the top.
716 is_block_empty(nir_block *block)
718 return nir_cf_node_is_last(&block->cf_node) &&
719 exec_list_is_empty(&block->instr_list);
723 nir_block_ends_in_continue(nir_block *block)
725 if (exec_list_is_empty(&block->instr_list))
728 nir_instr *instr = nir_block_last_instr(block);
819 /* If there are single-source phis in the last block,
824 /* Move the last block of the loop inside the last if-statement */
841 /* Walk all the phis in the block immediately following the if statement and
888 /* Only simplify if the then block is empty and the else block is not. */
918 * removal on the block after the if to clean up any such phis.
928 /* Finally, move the else block to the then block. */
1131 * ... then block instructions ...
1144 * ... then block instructions ...
1169 /* If the continue from block is empty then return as there is nothing to
1184 * removal on the block after the if to clean up any such phis.
1246 * block block_1:
1255 * block block_2:
1259 * block block_3:
1261 * block block_4:
1263 * block block_5:
1267 * block block_6:
1269 * block block_7:
1271 * block block_8:
1275 * block block_9:
1277 * block block_10:
1280 * block block_11:
1283 * block block_12:
1406 if (use->parent_instr->block->index < first->index ||
1407 use->parent_instr->block->index > last->index)
1543 * Note: This only merges if-statements when the block between them is
1567 /* Rewrite the predecessor block for any phis following the second
1587 instr->block = next_blk;