From: Rhys Perry Date: Wed, 5 Aug 2020 12:29:58 +0000 (+0100) Subject: aco: don't consider the first partial spill if it's the wrong type X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1a5444b90013213fa1f1108dc74e17c5e596e5a0;p=mesa.git aco: don't consider the first partial spill if it's the wrong type Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Cc: 20.2 Part-of: --- diff --git a/src/amd/compiler/aco_spill.cpp b/src/amd/compiler/aco_spill.cpp index 9609d639fb3..45c67469d94 100644 --- a/src/amd/compiler/aco_spill.cpp +++ b/src/amd/compiler/aco_spill.cpp @@ -647,8 +647,8 @@ RegisterDemand init_live_in_vars(spill_ctx& ctx, Block* block, unsigned block_id assert(!partial_spills.empty()); std::set::iterator it = partial_spills.begin(); - Temp to_spill = *it; - unsigned distance = ctx.next_use_distances_start[block_idx][*it].second; + Temp to_spill = Temp(); + unsigned distance = 0; while (it != partial_spills.end()) { assert(ctx.spills_entry[block_idx].find(*it) == ctx.spills_entry[block_idx].end()); @@ -670,8 +670,8 @@ RegisterDemand init_live_in_vars(spill_ctx& ctx, Block* block, unsigned block_id assert(!partial_spills.empty()); std::set::iterator it = partial_spills.begin(); - Temp to_spill = *it; - unsigned distance = ctx.next_use_distances_start[block_idx][*it].second; + Temp to_spill = Temp(); + unsigned distance = 0; while (it != partial_spills.end()) { assert(ctx.spills_entry[block_idx].find(*it) == ctx.spills_entry[block_idx].end());