diff --git a/src/freedreno/ir3/instr-a3xx.h b/src/freedreno/ir3/instr-a3xx.h index e7f31fd3b82..656ee2b6db3 100644 --- a/src/freedreno/ir3/instr-a3xx.h +++ b/src/freedreno/ir3/instr-a3xx.h @@ -314,6 +314,14 @@ typedef enum { */ OPC_META_TEX_PREFETCH = _OPC(-1, 4), + /* Parallel copies have multiple destinations, and copy each destination + * to its corresponding source. This happens "in parallel," meaning that + * it happens as-if every source is read first and then every destination + * is stored. These are produced in RA when register shuffling is + * required, and then lowered away immediately afterwards. + */ + OPC_META_PARALLEL_COPY = _OPC(-1, 5), + OPC_META_PHI = _OPC(-1, 6), } opc_t; #define opc_cat(opc) ((int)((opc) >> NOPC_BITS)) diff --git a/src/freedreno/ir3/ir3.h b/src/freedreno/ir3/ir3.h index 92b9bd19c6a..6a37afa34ed 100644 --- a/src/freedreno/ir3/ir3.h +++ b/src/freedreno/ir3/ir3.h @@ -309,6 +309,12 @@ struct ir3_instruction { */ unsigned *outidxs; } end; + struct { + /* used to temporarily hold reference to nir_phi_instr + * until we resolve the phi srcs + */ + void *nphi; + } phi; struct { unsigned samp, tex; unsigned input_offset; diff --git a/src/freedreno/ir3/ir3_print.c b/src/freedreno/ir3/ir3_print.c index 4eb5362960d..ff5c5bbe538 100644 --- a/src/freedreno/ir3/ir3_print.c +++ b/src/freedreno/ir3/ir3_print.c @@ -99,9 +99,11 @@ static void print_instr_name(struct ir3_instruction *instr, bool flags) if (is_meta(instr)) { switch (instr->opc) { case OPC_META_INPUT: printf("_meta:in"); break; - case OPC_META_SPLIT: printf("_meta:split"); break; - case OPC_META_COLLECT: printf("_meta:collect"); break; - case OPC_META_TEX_PREFETCH: printf("_meta:tex_prefetch"); break; + case OPC_META_SPLIT: printf("_meta:split"); break; + case OPC_META_COLLECT: printf("_meta:collect"); break; + case OPC_META_TEX_PREFETCH: printf("_meta:tex_prefetch"); break; + case OPC_META_PARALLEL_COPY: printf("_meta:parallel_copy"); break; + case OPC_META_PHI: printf("_meta:phi"); break; /* shouldn't hit here.. just for debugging: */ default: printf("_meta:%d", instr->opc); break;