Module: Mesa Branch: staging/23.0 Commit: 3c93675e524f855d7012800ff50918035b9a7772 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3c93675e524f855d7012800ff50918035b9a7772
Author: Lionel Landwerlin <[email protected]> Date: Fri Mar 17 09:42:31 2023 +0200 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 <[email protected]> Cc: mesa-stable Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21853> (cherry picked from commit 34d8bfe65f47df92efe83d902522297614f9a44a) Conflicts: src/intel/compiler/brw_fs.cpp --- .pick_status.json | 2 +- src/intel/compiler/brw_fs.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 016010b1afb..7766ee73289 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -4934,7 +4934,7 @@ "description": "intel/fs: run VGRF compaction just before max live register accounting", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index 8253643a67c..480a13b1ed2 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -6624,6 +6624,8 @@ fs_visitor::allocate_registers(bool allow_spilling) "lifo" }; + compact_virtual_grfs(); + bool spill_all = allow_spilling && INTEL_DEBUG(DEBUG_SPILL_FS); /* Before we schedule anything, stash off the instruction order as an array
