From 760fe44e8c09e533fb96d327e658aea4bfe3c883 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Tue, 25 Feb 2020 00:49:01 +0100 Subject: [PATCH] aco: pass vars by const & Reviewed-by: Rhys Perry Tested-by: Marge Bot Part-of: --- src/amd/compiler/aco_register_allocation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.30.2