From 34d8bfe65f47df92efe83d902522297614f9a44a Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Fri, 17 Mar 2023 09:42:31 +0200 Subject: [PATCH] intel/fs: run VGRF compaction just before max live register accounting There are a number of instances of the dead code elimination pass that could reduce the count. For some reason this also seems to affect register allocation itself. Signed-off-by: Lionel Landwerlin Cc: mesa-stable Reviewed-by: Kenneth Graunke Reviewed-by: Francisco Jerez Part-of: --- src/intel/compiler/brw_fs.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index b22b32e5112..77cd0b757b8 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -6506,6 +6506,8 @@ fs_visitor::allocate_registers(bool allow_spilling) "lifo" }; + compact_virtual_grfs(); + if (needs_register_pressure) shader_stats.max_register_pressure = compute_max_register_pressure();