struct list_head instructions;
/* Index of the block in source order */
- unsigned source_id;
+ unsigned name;
- bool is_scheduled;
+ bool scheduled;
/* List of midgard_bundles emitted (after the scheduler has run) */
struct util_dynarray bundles;
_mesa_hash_pointer,
_mesa_key_pointer_equal);
- blk->source_id = ctx->block_source_count++;
+ blk->name = ctx->block_source_count++;
return blk;
}
list_addtail(&this_block->link, &ctx->blocks);
- this_block->is_scheduled = false;
+ this_block->scheduled = false;
++ctx->block_count;
/* Set up current block */
void
mir_print_block(midgard_block *block)
{
- printf("block%u: {\n", block->source_id);
+ printf("block%u: {\n", block->name);
- if (block->is_scheduled) {
+ if (block->scheduled) {
mir_foreach_bundle_in_block(block, bundle) {
for (unsigned i = 0; i < bundle->instruction_count; ++i)
mir_print_instruction(bundle->instructions[i]);
if (block->nr_successors) {
printf(" -> ");
for (unsigned i = 0; i < block->nr_successors; ++i) {
- printf("block%u%s", block->successors[i]->source_id,
+ printf("block%u%s", block->successors[i]->name,
(i + 1) != block->nr_successors ? ", " : "");
}
}
printf(" from { ");
mir_foreach_predecessor(block, pred)
- printf("block%u ", pred->source_id);
+ printf("block%u ", pred->name);
printf("}");
printf("\n\n");
if (blend_offset)
ctx->blend_constant_offset = ((ctx->quadword_count + block->quadword_count) - blend_offset - 1) * 0x10;
- block->is_scheduled = true;
+ block->scheduled = true;
ctx->quadword_count += block->quadword_count;
/* Reorder instructions to match bundled. First remove existing