fprintf(fp, "\n");
}
}
+
+void
+bi_print_block(bi_block *block, FILE *fp)
+{
+ fprintf(fp, "block%u {\n", block->name);
+
+ if (block->scheduled) {
+ bi_foreach_clause_in_block(block, clause)
+ bi_print_clause(clause, fp);
+ } else {
+ bi_foreach_instr_in_block(block, ins)
+ bi_print_instruction(ins, fp);
+ }
+
+ if (block->successors[0]) {
+ fprintf(fp, " -> ");
+
+ for (unsigned i = 0; i < ARRAY_SIZE(block->successors); ++i) {
+ if (block->successors[i])
+ fprintf(fp, "block%u", block->successors[i]->name);
+ }
+ }
+
+ fprintf(fp, " from ");
+
+ bi_foreach_predecessor(block, pred)
+ fprintf(fp, "block%u ", pred->name);
+
+ fprintf(fp, "\n");
+}
void bi_print_instruction(bi_instruction *ins, FILE *fp);
void bi_print_bundle(bi_bundle *bundle, FILE *fp);
void bi_print_clause(bi_clause *clause, FILE *fp);
+void bi_print_block(bi_block *block, FILE *fp);
#endif