Lines Matching refs:insn

14 	ir_insn *insn;  in ir_dump()  local
17 for (i = 1 - ctx->consts_count, insn = ctx->ir_base + i; i < IR_UNUSED; i++, insn++) { in ir_dump()
18 fprintf(f, "%05d %s %s(", i, ir_op_name[insn->op], ir_type_name[insn->type]); in ir_dump()
19 ir_print_const(ctx, insn, f, true); in ir_dump()
23 for (i = IR_UNUSED + 1, insn = ctx->ir_base + i; i < ctx->insns_count; i++, insn++) { in ir_dump()
24 flags = ir_op_flags[insn->op]; in ir_dump()
25 fprintf(f, "%05d %s", i, ir_op_name[insn->op]); in ir_dump()
26 if ((flags & IR_OP_FLAG_DATA) || ((flags & IR_OP_FLAG_MEM) && insn->type != IR_VOID)) { in ir_dump()
27 fprintf(f, " %s", ir_type_name[insn->type]); in ir_dump()
29 n = ir_operands_count(ctx, insn); in ir_dump()
30 for (j = 1, p = insn->ops + 1; j <= 3; j++, p++) { in ir_dump()
40 insn++; in ir_dump()
61 ir_insn *insn; in ir_dump_dot() local
66 for (i = 1 - ctx->consts_count, insn = ctx->ir_base + i; i < IR_UNUSED; i++, insn++) { in ir_dump_dot()
67 fprintf(f, "\tc%d [label=\"C%d: CONST %s(", -i, -i, ir_type_name[insn->type]); in ir_dump_dot()
69 ir_print_const(ctx, insn, f, false); in ir_dump_dot()
73 for (i = IR_UNUSED + 1, insn = ctx->ir_base + i; i < ctx->insns_count;) { in ir_dump_dot()
74 flags = ir_op_flags[insn->op]; in ir_dump_dot()
76 if (insn->op == IR_START) { in ir_dump_dot()
77 …bel=\"%d: %s\",shape=box,style=\"rounded,filled\",fillcolor=red];}\n", i, i, ir_op_name[insn->op]); in ir_dump_dot()
78 } else if (insn->op == IR_ENTRY) { in ir_dump_dot()
79 …bel=\"%d: %s\",shape=box,style=\"rounded,filled\",fillcolor=red];}\n", i, i, ir_op_name[insn->op]); in ir_dump_dot()
81 …bel=\"%d: %s\",shape=box,style=\"rounded,filled\",fillcolor=red];}\n", i, i, ir_op_name[insn->op]); in ir_dump_dot()
83 …, "\tn%d [label=\"%d: %s\",shape=box,style=filled,fillcolor=pink];\n", i, i, ir_op_name[insn->op]); in ir_dump_dot()
85 …%d [label=\"%d: %s\",shape=box,style=filled,fillcolor=lightcoral];\n", i, i, ir_op_name[insn->op]); in ir_dump_dot()
90 fprintf(f, "\tn%d [label=\"%d: %s\"", i, i, ir_op_name[insn->op]); in ir_dump_dot()
93 if (insn->op == IR_PARAM) { in ir_dump_dot()
95 i, i, ir_op_name[insn->op], ir_type_name[insn->type], ir_get_str(ctx, insn->op2)); in ir_dump_dot()
96 } else if (insn->op == IR_VAR) { in ir_dump_dot()
97 …\"%d: %s %s \\\"%s\\\"\"];\n", i, i, ir_op_name[insn->op], ir_type_name[insn->type], ir_get_str(ct… in ir_dump_dot()
99 …s\",style=filled,fillcolor=deepskyblue];\n", i, i, ir_op_name[insn->op], ir_type_name[insn->type]); in ir_dump_dot()
103 n = ir_operands_count(ctx, insn); in ir_dump_dot()
104 for (j = 1, p = insn->ops + 1; j <= n; j++, p++) { in ir_dump_dot()
111 } else if (insn->op == IR_PHI in ir_dump_dot()
112 && ctx->ir_base[insn->op1].op == IR_LOOP_BEGIN in ir_dump_dot()
113 && ctx->ir_base[ir_insn_op(&ctx->ir_base[insn->op1], j - 1)].op == IR_LOOP_END) { in ir_dump_dot()
120 if (insn->op == IR_LOOP_BEGIN && ctx->ir_base[ref].op == IR_LOOP_END) { in ir_dump_dot()
122 } else if (insn->op == IR_ENTRY) { in ir_dump_dot()
137 insn += n; in ir_dump_dot()
481 ir_insn *insn; in ir_dump_codegen() local
487 for (i = IR_UNUSED + 1, insn = ctx->ir_base - i; i < ctx->consts_count; i++, insn--) { in ir_dump_codegen()
488 fprintf(f, "\t%s c_%d = ", ir_type_cname[insn->type], i); in ir_dump_codegen()
489 if (insn->op == IR_FUNC) { in ir_dump_codegen()
490 fprintf(f, "func %s", ir_get_str(ctx, insn->val.name)); in ir_dump_codegen()
491 ir_print_proto(ctx, insn->proto, f); in ir_dump_codegen()
492 } else if (insn->op == IR_SYM) { in ir_dump_codegen()
493 fprintf(f, "sym(%s)", ir_get_str(ctx, insn->val.name)); in ir_dump_codegen()
494 } else if (insn->op == IR_FUNC_ADDR) { in ir_dump_codegen()
496 ir_print_const(ctx, insn, f, true); in ir_dump_codegen()
497 ir_print_proto(ctx, insn->proto, f); in ir_dump_codegen()
499 ir_print_const(ctx, insn, f, true); in ir_dump_codegen()
555 for (i = bb->start, insn = ctx->ir_base + i; i <= bb->end;) { in ir_dump_codegen()
556 flags = ir_op_flags[insn->op]; in ir_dump_codegen()
558 if (!(flags & IR_OP_FLAG_MEM) || insn->type == IR_VOID) { in ir_dump_codegen()
561 fprintf(f, "\t%s d_%d", ir_type_cname[insn->type], i); in ir_dump_codegen()
568 fprintf(f, " {%%%s%s}", ir_reg_name(IR_REG_NUM(reg), insn->type), in ir_dump_codegen()
577 fprintf(f, "%s d_%d", ir_type_cname[insn->type], i); in ir_dump_codegen()
584 fprintf(f, " {%%%s%s}", ir_reg_name(IR_REG_NUM(reg), insn->type), in ir_dump_codegen()
591 fprintf(f, "%s", ir_op_name[insn->op]); in ir_dump_codegen()
592 n = ir_operands_count(ctx, insn); in ir_dump_codegen()
593 if ((insn->op == IR_MERGE || insn->op == IR_LOOP_BEGIN) && n != 2) { in ir_dump_codegen()
595 } else if ((insn->op == IR_CALL || insn->op == IR_TAILCALL) && n != 2) { in ir_dump_codegen()
597 } else if (insn->op == IR_PHI && n != 3) { in ir_dump_codegen()
599 } else if (insn->op == IR_SNAPSHOT) { in ir_dump_codegen()
603 for (j = 1, p = insn->ops + 1; j <= n; j++, p++) { in ir_dump_codegen()
666 …if (((flags & IR_OP_FLAG_DATA) || ((flags & IR_OP_FLAG_MEM) && insn->type != IR_VOID)) && ctx->bin… in ir_dump_codegen()
697 insn += n; in ir_dump_codegen()
704 insn = &ctx->ir_base[bb->end]; in ir_dump_codegen()
705 if (insn->op == IR_END || insn->op == IR_LOOP_END) { in ir_dump_codegen()
733 } else if (insn->op == IR_IF) { in ir_dump_codegen()
738 } else if (insn->op == IR_SWITCH) { in ir_dump_codegen()