Lines Matching refs:bb

165 static void ir_dump_dessa_moves(const ir_ctx *ctx, int b, ir_block *bb, FILE *f)  in ir_dump_dessa_moves()  argument
173 IR_ASSERT(bb->successors_count == 1); in ir_dump_dessa_moves()
174 succ = ctx->cfg_edges[bb->successors]; in ir_dump_dessa_moves()
213 static void ir_dump_cfg_block(ir_ctx *ctx, FILE *f, uint32_t b, ir_block *bb) in ir_dump_cfg_block() argument
216 fprintf(f, "\tstart=%d\n", bb->start); in ir_dump_cfg_block()
217 fprintf(f, "\tend=%d\n", bb->end); in ir_dump_cfg_block()
218 if (bb->successors_count) { in ir_dump_cfg_block()
221 fprintf(f, "\tsuccessors(%d) [BB%d", bb->successors_count, ctx->cfg_edges[bb->successors]); in ir_dump_cfg_block()
222 for (i = 1; i < bb->successors_count; i++) { in ir_dump_cfg_block()
223 fprintf(f, ", BB%d", ctx->cfg_edges[bb->successors + i]); in ir_dump_cfg_block()
227 if (bb->predecessors_count) { in ir_dump_cfg_block()
230 fprintf(f, "\tpredecessors(%d) [BB%d", bb->predecessors_count, ctx->cfg_edges[bb->predecessors]); in ir_dump_cfg_block()
231 for (i = 1; i < bb->predecessors_count; i++) { in ir_dump_cfg_block()
232 fprintf(f, ", BB%d", ctx->cfg_edges[bb->predecessors + i]); in ir_dump_cfg_block()
236 if (bb->dom_parent > 0) { in ir_dump_cfg_block()
237 fprintf(f, "\tdom_parent=BB%d\n", bb->dom_parent); in ir_dump_cfg_block()
239 fprintf(f, "\tdom_depth=%d\n", bb->dom_depth); in ir_dump_cfg_block()
240 if (bb->dom_child > 0) { in ir_dump_cfg_block()
241 int child = bb->dom_child; in ir_dump_cfg_block()
250 if (bb->flags & IR_BB_ENTRY) { in ir_dump_cfg_block()
253 if (bb->flags & IR_BB_UNREACHABLE) { in ir_dump_cfg_block()
256 if (bb->flags & IR_BB_LOOP_HEADER) { in ir_dump_cfg_block()
257 if (bb->flags & IR_BB_LOOP_WITH_ENTRY) { in ir_dump_cfg_block()
263 if (bb->flags & IR_BB_IRREDUCIBLE_LOOP) { in ir_dump_cfg_block()
266 if (bb->loop_header > 0) { in ir_dump_cfg_block()
267 fprintf(f, "\tloop_header=BB%d\n", bb->loop_header); in ir_dump_cfg_block()
269 if (bb->loop_depth != 0) { in ir_dump_cfg_block()
270 fprintf(f, "\tloop_depth=%d\n", bb->loop_depth); in ir_dump_cfg_block()
272 if (bb->flags & IR_BB_OSR_ENTRY_LOADS) { in ir_dump_cfg_block()
296 if (bb->flags & IR_BB_DESSA_MOVES) { in ir_dump_cfg_block()
297 ir_dump_dessa_moves(ctx, b, bb, f); in ir_dump_cfg_block()
305 ir_block *bb = ctx->cfg_blocks + 1; in ir_dump_cfg() local
311 bb = &ctx->cfg_blocks[b]; in ir_dump_cfg()
312 ir_dump_cfg_block(ctx, f, b, bb); in ir_dump_cfg()
315 for (b = 1; b <= bb_count; b++, bb++) { in ir_dump_cfg()
316 ir_dump_cfg_block(ctx, f, b, bb); in ir_dump_cfg()
483 ir_block *bb; in ir_dump_codegen() local
510 bb = &ctx->cfg_blocks[b]; in ir_dump_codegen()
511 if ((bb->flags & (IR_BB_START|IR_BB_ENTRY|IR_BB_EMPTY)) == IR_BB_EMPTY) { in ir_dump_codegen()
515 fprintf(f, "#BB%d: end=l_%d", b, bb->end); in ir_dump_codegen()
516 if (bb->flags & IR_BB_UNREACHABLE) { in ir_dump_codegen()
519 if (bb->dom_parent > 0) { in ir_dump_codegen()
520 fprintf(f, ", idom=BB%d(%d)", bb->dom_parent, bb->dom_depth); in ir_dump_codegen()
522 if (bb->loop_depth != 0) { in ir_dump_codegen()
523 if (bb->flags & IR_BB_LOOP_HEADER) { in ir_dump_codegen()
524 if (bb->loop_header > 0) { in ir_dump_codegen()
525 fprintf(f, ", loop=HDR,BB%d(%d)", bb->loop_header, bb->loop_depth); in ir_dump_codegen()
527 IR_ASSERT(bb->loop_depth == 1); in ir_dump_codegen()
528 fprintf(f, ", loop=HDR(%d)", bb->loop_depth); in ir_dump_codegen()
531 IR_ASSERT(bb->loop_header > 0); in ir_dump_codegen()
532 fprintf(f, ", loop=BB%d(%d)", bb->loop_header, bb->loop_depth); in ir_dump_codegen()
535 if (bb->predecessors_count) { in ir_dump_codegen()
538 fprintf(f, ", pred(%d)=[BB%d", bb->predecessors_count, ctx->cfg_edges[bb->predecessors]); in ir_dump_codegen()
539 for (i = 1; i < bb->predecessors_count; i++) { in ir_dump_codegen()
540 fprintf(f, ", BB%d", ctx->cfg_edges[bb->predecessors + i]); in ir_dump_codegen()
544 if (bb->successors_count) { in ir_dump_codegen()
547 fprintf(f, ", succ(%d)=[BB%d", bb->successors_count, ctx->cfg_edges[bb->successors]); in ir_dump_codegen()
548 for (i = 1; i < bb->successors_count; i++) { in ir_dump_codegen()
549 fprintf(f, ", BB%d", ctx->cfg_edges[bb->successors + i]); in ir_dump_codegen()
555 for (i = bb->start, insn = ctx->ir_base + i; i <= bb->end;) { in ir_dump_codegen()
700 if (bb->flags & IR_BB_DESSA_MOVES) { in ir_dump_codegen()
701 ir_dump_dessa_moves(ctx, b, bb, f); in ir_dump_codegen()
704 insn = &ctx->ir_base[bb->end]; in ir_dump_codegen()
708 if (bb->successors_count == 1) { in ir_dump_codegen()
709 succ = ctx->cfg_edges[bb->successors]; in ir_dump_codegen()
712 IR_ASSERT(bb->successors_count == 2); in ir_dump_codegen()
713 succ = ctx->cfg_edges[bb->successors]; in ir_dump_codegen()
715 succ = ctx->cfg_edges[bb->successors + 1]; in ir_dump_codegen()
718 uint32_t fake_succ = ctx->cfg_edges[bb->successors + 1]; in ir_dump_codegen()