Lines Matching refs:instr
757 struct ir3_instruction *instr = dst->instr;
759 ra_foreach_dst (other_dst, instr) {
1055 bool dst_inserted[reg->instr->dsts_count];
1076 ra_foreach_dst_n (other_dst, n, reg->instr) {
1278 ra_foreach_dst (dst, reg->instr) {
1404 if (is_sfu(reg->instr) || is_alu(reg->instr)) {
1405 for (unsigned i = 0; i < reg->instr->srcs_count; i++) {
1406 struct ir3_register *src = reg->instr->srcs[i];
1453 assign_reg(struct ir3_instruction *instr, struct ir3_register *reg,
1491 assign_reg(dst->instr, dst, ra_interval_get_num(interval));
1563 assign_src(struct ra_ctx *ctx, struct ir3_instruction *instr,
1578 assign_reg(instr, src, ra_physreg_to_num(physreg, src->flags));
1588 insert_parallel_copy_instr(struct ra_ctx *ctx, struct ir3_instruction *instr)
1594 ir3_instr_create(instr->block, OPC_META_PARALLEL_COPY,
1620 list_addtail(&pcopy->node, &instr->node);
1625 handle_normal_instr(struct ra_ctx *ctx, struct ir3_instruction *instr)
1628 ra_foreach_src (src, instr) {
1633 ra_foreach_dst (dst, instr) {
1638 ra_foreach_dst (dst, instr) {
1646 ra_foreach_src_rev (src, instr) {
1647 assign_src(ctx, instr, src);
1651 ra_foreach_dst (dst, instr) {
1655 insert_parallel_copy_instr(ctx, instr);
1659 handle_split(struct ra_ctx *ctx, struct ir3_instruction *instr)
1661 struct ir3_register *dst = instr->dsts[0];
1662 struct ir3_register *src = instr->srcs[0];
1665 handle_normal_instr(ctx, instr);
1672 assign_src(ctx, instr, src);
1680 handle_collect(struct ra_ctx *ctx, struct ir3_instruction *instr)
1682 struct ir3_merge_set *dst_set = instr->dsts[0]->merge_set;
1683 unsigned dst_offset = instr->dsts[0]->merge_set_offset;
1686 handle_normal_instr(ctx, instr);
1707 ra_foreach_src (src, instr) {
1719 if (reg_size(interval->interval.reg) >= reg_size(instr->dsts[0])) {
1734 allocate_dst_fixed(ctx, instr->dsts[0], dst_fixed);
1736 allocate_dst(ctx, instr->dsts[0]);
1739 ra_foreach_src (src, instr) {
1752 ra_foreach_src_rev (src, instr) {
1753 assign_src(ctx, instr, src);
1767 insert_parallel_copy_instr(ctx, instr);
1773 insert_dst(ctx, instr->dsts[0]);
1781 handle_pcopy(struct ra_ctx *ctx, struct ir3_instruction *instr)
1783 ra_foreach_src_rev (src, instr) {
1784 assign_src(ctx, instr, src);
1795 handle_precolored_input(struct ra_ctx *ctx, struct ir3_instruction *instr)
1797 if (instr->dsts[0]->num == INVALID_REG)
1800 struct ra_file *file = ra_get_file(ctx, instr->dsts[0]);
1801 struct ra_interval *interval = &ctx->intervals[instr->dsts[0]->name];
1802 physreg_t physreg = ra_reg_get_physreg(instr->dsts[0]);
1803 allocate_dst_fixed(ctx, instr->dsts[0], physreg);
1805 d("insert precolored dst %u physreg %u", instr->dsts[0]->name,
1813 handle_input(struct ra_ctx *ctx, struct ir3_instruction *instr)
1815 if (instr->dsts[0]->num != INVALID_REG)
1818 allocate_dst(ctx, instr->dsts[0]);
1820 struct ra_file *file = ra_get_file(ctx, instr->dsts[0]);
1821 struct ra_interval *interval = &ctx->intervals[instr->dsts[0]->name];
1826 assign_input(struct ra_ctx *ctx, struct ir3_instruction *instr)
1828 struct ra_interval *interval = &ctx->intervals[instr->dsts[0]->name];
1829 struct ra_file *file = ra_get_file(ctx, instr->dsts[0]);
1831 if (instr->dsts[0]->num == INVALID_REG) {
1832 assign_reg(instr, instr->dsts[0], ra_interval_get_num(interval));
1837 if (instr->dsts[0]->flags & IR3_REG_UNUSED)
1840 ra_foreach_src_rev (src, instr)
1841 assign_src(ctx, instr, src);
1887 handle_chmask(struct ra_ctx *ctx, struct ir3_instruction *instr)
1894 ra_foreach_src (src, instr) {
1899 ra_foreach_src (src, instr) {
1906 insert_parallel_copy_instr(ctx, instr);
1956 if (def->instr->opc == OPC_META_PARALLEL_COPY)
2055 old_pcopy->dsts[i]->instr = pcopy;
2245 foreach_instr (instr, &block->instr_list) {
2246 if (instr->opc == OPC_META_INPUT)
2247 handle_precolored_input(ctx, instr);
2259 foreach_instr (instr, &block->instr_list) {
2260 if (instr->opc == OPC_META_PHI)
2261 handle_phi(ctx, instr->dsts[0]);
2262 else if (instr->opc == OPC_META_INPUT ||
2263 instr->opc == OPC_META_TEX_PREFETCH)
2264 handle_input(ctx, instr);
2286 foreach_instr (instr, &block->instr_list) {
2287 di(instr, "processing");
2289 if (instr->opc == OPC_META_PHI)
2290 assign_phi(ctx, instr);
2291 else if (instr->opc == OPC_META_INPUT ||
2292 instr->opc == OPC_META_TEX_PREFETCH)
2293 assign_input(ctx, instr);
2294 else if (instr->opc == OPC_META_SPLIT)
2295 handle_split(ctx, instr);
2296 else if (instr->opc == OPC_META_COLLECT)
2297 handle_collect(ctx, instr);
2298 else if (instr->opc == OPC_META_PARALLEL_COPY)
2299 handle_pcopy(ctx, instr);
2300 else if (instr->opc == OPC_CHMASK)
2301 handle_chmask(ctx, instr);
2303 handle_normal_instr(ctx, instr);
2433 foreach_instr (instr, &block->instr_list) {
2434 ra_foreach_dst (dst, instr) {
2439 if (instr->opc == OPC_META_PHI) {
2440 ir3_reg_interval_insert(ctx, &intervals[instr->dsts[0]->name]);
2444 if (instr->opc == OPC_META_PARALLEL_COPY)
2449 ra_foreach_dst (dst, instr) {
2454 ra_foreach_src_rev (src, instr) {
2476 ra_foreach_dst (dst, instr) {
2636 foreach_instr (instr, &block->instr_list) {
2637 for (unsigned i = 0; i < instr->dsts_count; i++) {
2638 instr->dsts[i]->flags &= ~IR3_REG_SSA;
2646 if (!is_meta(instr) && instr->opc != OPC_RELOAD_MACRO)
2647 instr->dsts[i]->flags &= ~IR3_REG_ARRAY;
2650 for (unsigned i = 0; i < instr->srcs_count; i++) {
2651 instr->srcs[i]->flags &= ~IR3_REG_SSA;
2653 if (!is_meta(instr) && instr->opc != OPC_SPILL_MACRO)
2654 instr->srcs[i]->flags &= ~IR3_REG_ARRAY;