aco: pass vars by const &
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3935> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3935>
This commit is contained in:
parent
5469221e77
commit
760fe44e8c
|
@ -313,7 +313,7 @@ std::pair<PhysReg, bool> get_reg_simple(ra_ctx& ctx,
|
||||||
bool get_regs_for_copies(ra_ctx& ctx,
|
bool get_regs_for_copies(ra_ctx& ctx,
|
||||||
RegisterFile& reg_file,
|
RegisterFile& reg_file,
|
||||||
std::vector<std::pair<Operand, Definition>>& parallelcopies,
|
std::vector<std::pair<Operand, Definition>>& parallelcopies,
|
||||||
std::set<std::pair<unsigned, unsigned>> vars,
|
const std::set<std::pair<unsigned, unsigned>> &vars,
|
||||||
uint32_t lb, uint32_t ub,
|
uint32_t lb, uint32_t ub,
|
||||||
aco_ptr<Instruction>& instr,
|
aco_ptr<Instruction>& instr,
|
||||||
uint32_t def_reg_lo,
|
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 */
|
/* 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. */
|
/* NOTE: variables are also sorted by ID. this only affects a very small number of shaders slightly though. */
|
||||||
for (std::set<std::pair<unsigned, unsigned>>::reverse_iterator it = vars.rbegin(); it != vars.rend(); ++it) {
|
for (std::set<std::pair<unsigned, unsigned>>::const_reverse_iterator it = vars.rbegin(); it != vars.rend(); ++it) {
|
||||||
unsigned id = it->second;
|
unsigned id = it->second;
|
||||||
std::pair<PhysReg, RegClass> var = ctx.assignments[id];
|
std::pair<PhysReg, RegClass> var = ctx.assignments[id];
|
||||||
uint32_t size = it->first;
|
uint32_t size = it->first;
|
||||||
|
|
Loading…
Reference in New Issue