From 9f522ac0c65ceae11ad1a4e84ec9f32a9393a25c Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Wed, 26 Apr 2023 12:57:33 +0200 Subject: [PATCH] broadcom/compiler: don't allocate undef to rf0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit rf0 is affected by restrictions in some scenarios so we rather use a register that does not cause conflicts for scheduling. total instructions in shared programs: 12850958 -> 12848024 (-0.02%) instructions in affected programs: 331974 -> 329040 (-0.88%) helped: 2559 HURT: 201 Instructions are helped. total max-temps in shared programs: 2210893 -> 2210803 (<.01%) max-temps in affected programs: 1486 -> 1396 (-6.06%) helped: 96 HURT: 7 Max-temps are helped. total sfu-stalls in shared programs: 21975 -> 21965 (-0.05%) sfu-stalls in affected programs: 32 -> 22 (-31.25%) helped: 16 HURT: 6 Sfu-stalls are helped. total inst-and-stalls in shared programs: 12872933 -> 12869989 (-0.02%) inst-and-stalls in affected programs: 332036 -> 329092 (-0.89%) helped: 2560 HURT: 189 Inst-and-stalls are helped. total nops in shared programs: 305911 -> 303501 (-0.79%) nops in affected programs: 11215 -> 8805 (-21.49%) helped: 2131 HURT: 3 Nops are helped. Reviewed-by: Alejandro Piñeiro Part-of: --- src/broadcom/compiler/vir_to_qpu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/broadcom/compiler/vir_to_qpu.c b/src/broadcom/compiler/vir_to_qpu.c index 7f643ca..246a3a1 100644 --- a/src/broadcom/compiler/vir_to_qpu.c +++ b/src/broadcom/compiler/vir_to_qpu.c @@ -214,9 +214,10 @@ v3d_generate_code_block(struct v3d_compile *c, break; case QFILE_NULL: /* QFILE_NULL is an undef, so we can load - * anything. Using reg 0 + * anything. Using a reg that doesn't have + * sched. restrictions. */ - src[i] = qpu_reg(0); + src[i] = qpu_reg(5); break; case QFILE_LOAD_IMM: assert(!"not reached"); -- 2.7.4