From e60a70dde02f69a57946282feafd50a2efbe41e9 Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Thu, 15 Jul 2021 15:14:41 +0200 Subject: [PATCH] aco/spill: Store remat list in an std::unordered_map instead of std::map MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_spill.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/compiler/aco_spill.cpp b/src/amd/compiler/aco_spill.cpp index 3522a287a75..fbd396f3579 100644 --- a/src/amd/compiler/aco_spill.cpp +++ b/src/amd/compiler/aco_spill.cpp @@ -78,7 +78,7 @@ struct spill_ctx { std::vector>> interferences; std::vector> affinities; std::vector is_reloaded; - std::map remat; + std::unordered_map remat; std::set unused_remats; unsigned wave_size; @@ -309,7 +309,7 @@ should_rematerialize(aco_ptr& instr) aco_ptr do_reload(spill_ctx& ctx, Temp tmp, Temp new_name, uint32_t spill_id) { - std::map::iterator remat = ctx.remat.find(tmp); + std::unordered_map::iterator remat = ctx.remat.find(tmp); if (remat != ctx.remat.end()) { Instruction* instr = remat->second.instr; assert((instr->isVOP1() || instr->isSOP1() || instr->isPseudo() || instr->isSOPK()) &&