From 4246a1ff4719a74de877282fb8729af6108cac09 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Fri, 8 Jul 2022 11:27:13 -0700 Subject: [PATCH] intel/compiler: Don't create vec4 reg-set for gen8+ After 60e1d0f0286, we know that vec4 will never be used for gen >= 8. Ref: 60e1d0f0286 ("intel/compiler: Remove INTEL_SCALAR_... env variables") Signed-off-by: Jordan Justen Reviewed-by: Francisco Jerez Part-of: --- src/intel/compiler/brw_compiler.c | 3 ++- src/intel/compiler/brw_vec4_reg_allocate.cpp | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/intel/compiler/brw_compiler.c b/src/intel/compiler/brw_compiler.c index 5c9e022d21c..feb84bc2adf 100644 --- a/src/intel/compiler/brw_compiler.c +++ b/src/intel/compiler/brw_compiler.c @@ -110,7 +110,8 @@ brw_compiler_create(void *mem_ctx, const struct intel_device_info *devinfo) brw_init_isa_info(&compiler->isa, devinfo); brw_fs_alloc_reg_sets(compiler); - brw_vec4_alloc_reg_set(compiler); + if (devinfo->ver < 8) + brw_vec4_alloc_reg_set(compiler); compiler->precise_trig = env_var_as_boolean("INTEL_PRECISE_TRIG", false); diff --git a/src/intel/compiler/brw_vec4_reg_allocate.cpp b/src/intel/compiler/brw_vec4_reg_allocate.cpp index 8d55e264314..7aaacd0c7cb 100644 --- a/src/intel/compiler/brw_vec4_reg_allocate.cpp +++ b/src/intel/compiler/brw_vec4_reg_allocate.cpp @@ -94,6 +94,8 @@ brw_vec4_alloc_reg_set(struct brw_compiler *compiler) int base_reg_count = compiler->devinfo->ver >= 7 ? GFX7_MRF_HACK_START : BRW_MAX_GRF; + assert(compiler->devinfo->ver < 8); + /* After running split_virtual_grfs(), almost all VGRFs will be of size 1. * SEND-from-GRF sources cannot be split, so we also need classes for each * potential message length. @@ -163,6 +165,8 @@ vec4_visitor::reg_allocate() if (0) return reg_allocate_trivial(); + assert(devinfo->ver < 8); + const vec4_live_variables &live = live_analysis.require(); int node_count = alloc.count; int first_payload_node = node_count;