From d8ec092e01ceecb2f9cd0b0126430815873a2ec3 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Tue, 16 Nov 2021 17:33:11 +0000 Subject: [PATCH] aco/spill: use spills_entry instead of spills_exit to kill linear VGPRs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If a predecessor has only spilled constants (no temporaries), spills_exit will be empty. fossil-db (Sienna Cichlid): Totals from 2 (0.00% of 128647) affected shaders: Latency: 139106 -> 139104 (-0.00%) Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5633 Cc: mesa-stable Part-of: (cherry picked from commit cc2894345f1161fcbb2f9b9150257e0f6b0b303e) --- .pick_status.json | 2 +- src/amd/compiler/aco_spill.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index acacae06e5c..901f8ec535d 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -553,7 +553,7 @@ "description": "aco/spill: use spills_entry instead of spills_exit to kill linear VGPRs", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/amd/compiler/aco_spill.cpp b/src/amd/compiler/aco_spill.cpp index 205a687b7e4..821ef85806c 100644 --- a/src/amd/compiler/aco_spill.cpp +++ b/src/amd/compiler/aco_spill.cpp @@ -1563,7 +1563,7 @@ assign_spill_slots(spill_ctx& ctx, unsigned spills_to_vgpr) continue; bool can_destroy = true; - for (std::pair pair : ctx.spills_exit[block.linear_preds[0]]) { + for (std::pair pair : ctx.spills_entry[block.index]) { if (ctx.interferences[pair.second].first.type() == RegType::sgpr && slots[pair.second] / ctx.wave_size == i) {