From: Iago Toral Quiroga Date: Mon, 7 Mar 2022 13:03:03 +0000 (+0100) Subject: broadcom/compiler: add comment on why we don't use r5 with ldunifa X-Git-Tag: upstream/22.3.5~11894 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=77f58b46d9f20af89e74d1301e4220b5e48fa8be;p=platform%2Fupstream%2Fmesa.git broadcom/compiler: add comment on why we don't use r5 with ldunifa Reviewed-by: Alejandro PiƱeiro Part-of: --- diff --git a/src/broadcom/compiler/vir_register_allocate.c b/src/broadcom/compiler/vir_register_allocate.c index 4862f42..46c7e52 100644 --- a/src/broadcom/compiler/vir_register_allocate.c +++ b/src/broadcom/compiler/vir_register_allocate.c @@ -916,6 +916,11 @@ update_graph_and_reg_classes_for_inst(struct v3d_compile *c, int *acc_nodes, if (inst->dst.file == QFILE_TEMP) { /* Only a ldunif gets to write to R5, which only has a * single 32-bit channel of storage. + * + * NOTE: ldunifa is subject to the same, however, going by + * shader-db it is best to keep r5 exclusive to ldunif, probably + * because ldunif has usually a shorter lifespan, allowing for + * more accumulator reuse and QPU merges. */ if (!inst->qpu.sig.ldunif) { uint8_t class_bits =