diff --git a/src/amd/compiler/aco_opt_value_numbering.cpp b/src/amd/compiler/aco_opt_value_numbering.cpp index e1541446668..8b2fa3591ef 100644 --- a/src/amd/compiler/aco_opt_value_numbering.cpp +++ b/src/amd/compiler/aco_opt_value_numbering.cpp @@ -23,8 +23,8 @@ */ #include "aco_ir.h" +#include "aco_util.h" -#include #include #include @@ -297,12 +297,13 @@ struct InstrPred { } }; -using expr_set = std::unordered_map; +using expr_set = aco::unordered_map; struct vn_ctx { Program* program; + monotonic_buffer_resource m; expr_set expr_values; - std::map renames; + aco::unordered_map renames; /* The exec id should be the same on the same level of control flow depth. * Together with the check for dominator relations, it is safe to assume @@ -311,7 +312,7 @@ struct vn_ctx { */ uint32_t exec_id = 1; - vn_ctx(Program* program_) : program(program_) + vn_ctx(Program* program_) : program(program_), m(), expr_values(m), renames(m) { static_assert(sizeof(Temp) == 4, "Temp must fit in 32bits"); unsigned size = 0; @@ -446,7 +447,7 @@ process_block(vn_ctx& ctx, Block& block) } void -rename_phi_operands(Block& block, std::map& renames) +rename_phi_operands(Block& block, aco::unordered_map& renames) { for (aco_ptr& phi : block.instructions) { if (phi->opcode != aco_opcode::p_phi && phi->opcode != aco_opcode::p_linear_phi)