aco/spill: Replace map[] with map::insert
authorTony Wasserka <tony.wasserka@gmx.de>
Thu, 15 Jul 2021 14:13:58 +0000 (16:13 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 1 Oct 2021 09:39:13 +0000 (09:39 +0000)
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11925>

src/amd/compiler/aco_spill.cpp

index 4995121..646b492 100644 (file)
@@ -362,7 +362,7 @@ local_next_uses(spill_ctx& ctx, Block* block)
    std::map<Temp, uint32_t> next_uses;
    for (std::pair<const Temp, std::pair<uint32_t, uint32_t>>& pair :
         ctx.next_use_distances_end[block->index])
-      next_uses[pair.first] = pair.second.second + block->instructions.size();
+      next_uses.insert({pair.first, pair.second.second + block->instructions.size()});
 
    for (int idx = block->instructions.size() - 1; idx >= 0; idx--) {
       aco_ptr<Instruction>& instr = block->instructions[idx];