From: Albert Astals Cid Date: Wed, 26 Feb 2020 21:45:28 +0000 (+0100) Subject: aco: Minor optimization in spill_ctx constructor X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2521c81c9e898b6785cb4fc069c329c42c2990c6;p=mesa.git aco: Minor optimization in spill_ctx constructor 'register_demand' is passed by value and only copied once; consider moving it to avoid unnecessary copies Reviewed-by: Rhys Perry Tested-by: Marge Bot Part-of: --- diff --git a/src/amd/compiler/aco_spill.cpp b/src/amd/compiler/aco_spill.cpp index dfcdab2f003..f474685dbfe 100644 --- a/src/amd/compiler/aco_spill.cpp +++ b/src/amd/compiler/aco_spill.cpp @@ -65,7 +65,7 @@ struct spill_ctx { spill_ctx(const RegisterDemand target_pressure, Program* program, std::vector> register_demand) : target_pressure(target_pressure), program(program), - register_demand(register_demand), renames(program->blocks.size()), + register_demand(std::move(register_demand)), renames(program->blocks.size()), spills_entry(program->blocks.size()), spills_exit(program->blocks.size()), processed(program->blocks.size(), false), wave_size(program->wave_size) {}