Lines Matching defs:before
37 * 2. Each if-statement and loop must have one basic block before it and one
178 * Takes a basic block and inserts a new empty basic block before it, making its
356 /* Splits a basic block at the point specified by the cursor. The "before" and
359 * as before the first non-phi instruction, and it's illegal to split a block
360 * before a phi instruction.
367 nir_block *before, *after;
371 before = split_block_beginning(cursor.block);
375 before = cursor.block;
381 before = split_block_before_instr(cursor.instr);
389 before = cursor.instr->block;
393 before = split_block_before_instr(nir_instr_next(cursor.instr));
402 *_before = before;
412 insert_non_block(nir_block *before, nir_cf_node *node, nir_block *after)
414 node->parent = before->cf_node.parent;
415 exec_node_insert_after(&before->cf_node.node, &node->node);
416 if (!nir_block_ends_in_jump(before))
417 link_block_to_non_block(before, node);
551 * Returns a cursor pointing at the end of the before block (i.e.m between the
556 stitch_blocks(nir_block *before, nir_block *after)
559 * We move after into before, so we have to deal with up to 2 successors vs.
562 * TODO: special case when before is empty and after isn't?
565 if (nir_block_ends_in_jump(before)) {
574 return nir_after_block(before);
576 nir_instr *last_before_instr = nir_block_last_instr(before);
578 move_successors(after, before);
581 instr->block = before;
584 exec_list_append(&before->instr_list, &after->instr_list);
588 nir_before_block(before);
595 nir_block *before, *after;
597 split_block_cursor(cursor, &before, &after);
601 exec_node_insert_after(&before->cf_node.node, &block->cf_node.node);
602 block->cf_node.parent = before->cf_node.parent;
611 stitch_blocks(before, block);
614 insert_non_block(before, node, after);
698 /* Splitting a block twice with two cursors created before either split is
801 nir_block *before, *after;
813 split_block_cursor(cursor, &before, &after);
817 node->parent = before->cf_node.parent;
821 stitch_blocks(before,
822 nir_cf_node_as_block(nir_cf_node_next(&before->cf_node)));