Lines Matching defs:block
587 struct bi_block *block;
659 /* Link to next block. Must be first for mir_get_block */
662 /* List of instructions emitted for the current block */
665 /* Index of the block in source order */
673 /* Per 32-bit word live masks for the block indexed by node */
684 /* Scoreboard state at the start/end of block */
697 bi_num_predecessors(bi_block *block)
699 return util_dynarray_num_elements(&block->predecessors, bi_block *);
719 bi_block_add_successor(bi_block *block, bi_block *successor)
721 assert(block != NULL && successor != NULL);
724 if (block->unconditional_jumps)
727 for (unsigned i = 0; i < ARRAY_SIZE(block->successors); ++i) {
728 if (block->successors[i]) {
729 if (block->successors[i] == successor)
735 block->successors[i] = successor;
736 util_dynarray_append(&successor->predecessors, bi_block *, block);
963 #define bi_foreach_instr_in_block(block, v) \
964 list_for_each_entry(bi_instr, v, &(block)->instructions, link)
966 #define bi_foreach_instr_in_block_rev(block, v) \
967 list_for_each_entry_rev(bi_instr, v, &(block)->instructions, link)
969 #define bi_foreach_instr_in_block_safe(block, v) \
970 list_for_each_entry_safe(bi_instr, v, &(block)->instructions, link)
972 #define bi_foreach_instr_in_block_safe_rev(block, v) \
973 list_for_each_entry_safe_rev(bi_instr, v, &(block)->instructions, link)
975 #define bi_foreach_instr_in_block_from(block, v, from) \
976 list_for_each_entry_from(bi_instr, v, from, &(block)->instructions, link)
978 #define bi_foreach_instr_in_block_from_rev(block, v, from) \
979 list_for_each_entry_from_rev(bi_instr, v, from, &(block)->instructions, link)
981 #define bi_foreach_clause_in_block(block, v) \
982 list_for_each_entry(bi_clause, v, &(block)->clauses, link)
984 #define bi_foreach_clause_in_block_rev(block, v) \
985 list_for_each_entry_rev(bi_clause, v, &(block)->clauses, link)
987 #define bi_foreach_clause_in_block_safe(block, v) \
988 list_for_each_entry_safe(bi_clause, v, &(block)->clauses, link)
990 #define bi_foreach_clause_in_block_from(block, v, from) \
991 list_for_each_entry_from(bi_clause, v, from, &(block)->clauses, link)
993 #define bi_foreach_clause_in_block_from_rev(block, v, from) \
994 list_for_each_entry_from_rev(bi_clause, v, from, &(block)->clauses, link)
1051 bi_next_block(bi_block *block)
1053 return list_first_entry(&(block->link), bi_block, link);
1069 bi_clause * bi_next_clause(bi_context *ctx, bi_block *block, bi_clause *clause);
1071 bool bi_reconverge_branches(bi_block *block);
1080 void bi_print_block(bi_block *block, FILE *fp);
1086 bool bi_block_terminates_helpers(bi_block *block);
1143 /* Check if there are no more instructions starting with a given block, this
1147 bi_is_terminal_block(bi_block *block)
1149 return (block == NULL) ||
1150 (list_is_empty(&block->instructions) &&
1151 bi_is_terminal_block(block->successors[0]) &&
1152 bi_is_terminal_block(block->successors[1]));
1217 bi_block *block;
1223 bi_after_block(bi_block *block)
1227 .block = block
1250 bi_before_nonempty_block(bi_block *block)
1252 bi_instr *I = list_first_entry(&block->instructions, bi_instr, link);
1259 bi_before_block(bi_block *block)
1261 if (list_is_empty(&block->instructions))
1262 return bi_after_block(block);
1264 return bi_before_nonempty_block(block);
1303 #define bi_foreach_instr_in_clause(block, clause, pos) \
1305 (&pos->link != &(block)->instructions) \
1309 #define bi_foreach_instr_in_clause_rev(block, clause, pos) \
1311 (&pos->link != &(block)->instructions) \
1361 list_addtail(&I->link, &cursor->block->instructions);
1387 #define bi_worklist_push_head(w, block) u_worklist_push_head(w, block, index)
1388 #define bi_worklist_push_tail(w, block) u_worklist_push_tail(w, block, index)