Mesa (main): aco/spill: Store remat list in an std::unordered_map instead of std::map
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Oct 1 09:57:12 UTC 2021
Module: Mesa
Branch: main
Commit: e60a70dde02f69a57946282feafd50a2efbe41e9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e60a70dde02f69a57946282feafd50a2efbe41e9
Author: Tony Wasserka <tony.wasserka at gmx.de>
Date: Thu Jul 15 15:14:41 2021 +0200
aco/spill: Store remat list in an std::unordered_map instead of std::map
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11925>
---
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<std::pair<RegClass, std::unordered_set<uint32_t>>> interferences;
std::vector<std::vector<uint32_t>> affinities;
std::vector<bool> is_reloaded;
- std::map<Temp, remat_info> remat;
+ std::unordered_map<Temp, remat_info> remat;
std::set<Instruction*> unused_remats;
unsigned wave_size;
@@ -309,7 +309,7 @@ should_rematerialize(aco_ptr<Instruction>& instr)
aco_ptr<Instruction>
do_reload(spill_ctx& ctx, Temp tmp, Temp new_name, uint32_t spill_id)
{
- std::map<Temp, remat_info>::iterator remat = ctx.remat.find(tmp);
+ std::unordered_map<Temp, remat_info>::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()) &&
More information about the mesa-commit
mailing list