/* List of midgard_instructions emitted for the current block */
struct list_head instructions;
+ /* Index of the block in source order */
+ unsigned source_id;
+
bool is_scheduled;
/* List of midgard_bundles emitted (after the scheduler has run) */
int block_count;
struct list_head blocks;
+ /* TODO merge with block_count? */
+ unsigned block_source_count;
+
/* List of midgard_instructions emitted for the current block */
midgard_block *current_block;
void
mir_print_block(midgard_block *block)
{
- printf("%p: {\n", block);
+ printf("block%d: {\n", block->source_id);
mir_foreach_instr_in_block(block, ins) {
mir_print_instruction(ins);
if (block->nr_successors) {
printf(" -> ");
for (unsigned i = 0; i < block->nr_successors; ++i) {
- printf("%p%s", block->successors[i],
+ printf("block%d%s", block->successors[i]->source_id,
(i + 1) != block->nr_successors ? ", " : "");
}
}