diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index d43806e9bad..e8b1069a509 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -313,7 +313,7 @@ std::pair get_reg_simple(ra_ctx& ctx, bool get_regs_for_copies(ra_ctx& ctx, RegisterFile& reg_file, std::vector>& parallelcopies, - std::set> vars, + const std::set> &vars, uint32_t lb, uint32_t ub, aco_ptr& instr, uint32_t def_reg_lo, @@ -322,7 +322,7 @@ bool get_regs_for_copies(ra_ctx& ctx, /* variables are sorted from small sized to large */ /* NOTE: variables are also sorted by ID. this only affects a very small number of shaders slightly though. */ - for (std::set>::reverse_iterator it = vars.rbegin(); it != vars.rend(); ++it) { + for (std::set>::const_reverse_iterator it = vars.rbegin(); it != vars.rend(); ++it) { unsigned id = it->second; std::pair var = ctx.assignments[id]; uint32_t size = it->first;