From ec3bc5da74ede1e93a16beb8ed876edb991a9bef Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 4 Mar 2021 16:52:20 -0800 Subject: [PATCH] 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 Part-of: --- 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++) {