mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
aco/spill: Use std::unordered_map for spills_entry
fossil-db on Navi14: Totals from 305 (0.20% of 150305) affected shaders: CodeSize: 5498340 -> 5498328 (-0.00%) Instrs: 1009992 -> 1009989 (-0.00%) Latency: 33922644 -> 33923018 (+0.00%) InvThroughput: 9302963 -> 9303151 (+0.00%) VClause: 19004 -> 19001 (-0.02%) Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11925>
This commit is contained in:
parent
3fad5efd15
commit
fa655b6f70
1 changed files with 3 additions and 3 deletions
|
|
@ -67,7 +67,7 @@ struct spill_ctx {
|
|||
Program* program;
|
||||
std::vector<std::vector<RegisterDemand>> register_demand;
|
||||
std::vector<std::map<Temp, Temp>> renames;
|
||||
std::vector<std::map<Temp, uint32_t>> spills_entry;
|
||||
std::vector<std::unordered_map<Temp, uint32_t>> spills_entry;
|
||||
std::vector<std::unordered_map<Temp, uint32_t>> spills_exit;
|
||||
|
||||
std::vector<bool> processed;
|
||||
|
|
@ -1294,7 +1294,7 @@ spill_block(spill_ctx& ctx, unsigned block_idx)
|
|||
add_coupling_code(ctx, block, block_idx);
|
||||
}
|
||||
|
||||
const std::map<Temp, uint32_t>& current_spills = ctx.spills_entry[block_idx];
|
||||
const auto& current_spills = ctx.spills_entry[block_idx];
|
||||
|
||||
/* check conditions to process this block */
|
||||
bool process = (block->register_demand - spilled_registers).exceeds(ctx.target_pressure) ||
|
||||
|
|
@ -1306,7 +1306,7 @@ spill_block(spill_ctx& ctx, unsigned block_idx)
|
|||
}
|
||||
|
||||
assert(ctx.spills_exit[block_idx].empty());
|
||||
ctx.spills_exit[block_idx] = std::unordered_map<Temp, uint32_t>(current_spills.begin(), current_spills.end());
|
||||
ctx.spills_exit[block_idx] = current_spills;
|
||||
if (process) {
|
||||
process_block(ctx, block_idx, block, spilled_registers);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue