Mesa (main): v3d: Use the ra_alloc_contig_reg_class() function to speed up RA.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jun 4 19:32:16 UTC 2021
Module: Mesa
Branch: main
Commit: ec3bc5da74ede1e93a16beb8ed876edb991a9bef
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ec3bc5da74ede1e93a16beb8ed876edb991a9bef
Author: Eric Anholt <eric at anholt.net>
Date: Thu Mar 4 16:52:20 2021 -0800
v3d: Use the ra_alloc_contig_reg_class() function to speed up RA.
It means we don't need to do the n^2 loop over the regs to set up the pq
values, nor do we need the register conflicts lists.
Acked-by: Erico Nunes <nunes.erico at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9437>
---
src/broadcom/compiler/vir_register_allocate.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/broadcom/compiler/vir_register_allocate.c b/src/broadcom/compiler/vir_register_allocate.c
index 6a6bfd8a3d0..c55d8dc937d 100644
--- a/src/broadcom/compiler/vir_register_allocate.c
+++ b/src/broadcom/compiler/vir_register_allocate.c
@@ -501,19 +501,19 @@ vir_init_reg_sets(struct v3d_compiler *compiler)
int max_thread_index = (compiler->devinfo->ver >= 40 ? 2 : 3);
compiler->regs = ra_alloc_reg_set(compiler, PHYS_INDEX + PHYS_COUNT,
- true);
+ false);
if (!compiler->regs)
return false;
for (int threads = 0; threads < max_thread_index; threads++) {
compiler->reg_class_any[threads] =
- ra_alloc_reg_class(compiler->regs);
+ ra_alloc_contig_reg_class(compiler->regs, 1);
compiler->reg_class_r5[threads] =
- ra_alloc_reg_class(compiler->regs);
+ ra_alloc_contig_reg_class(compiler->regs, 1);
compiler->reg_class_phys_or_acc[threads] =
- ra_alloc_reg_class(compiler->regs);
+ ra_alloc_contig_reg_class(compiler->regs, 1);
compiler->reg_class_phys[threads] =
- ra_alloc_reg_class(compiler->regs);
+ ra_alloc_contig_reg_class(compiler->regs, 1);
for (int i = PHYS_INDEX;
i < PHYS_INDEX + (PHYS_COUNT >> threads); i++) {
More information about the mesa-commit
mailing list