From: Oschowa Date: Fri, 22 May 2020 10:52:05 +0000 (+0200) Subject: aco: Don't std::move temporary object. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7b1bc460fd6ae9bf5efeca62227bb05e0c50ee15;p=mesa.git aco: Don't std::move temporary object. Fixes the following clang warning: mesa/src/amd/compiler/aco_optimizer.cpp:2928:15: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] ctx.uses = std::move(dead_code_analysis(program)); Reviewed-by: Rhys Perry Reviewed-by: Samuel Pitoiset Part-of: --- diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp index c6228691b36..f16f165c21b 100644 --- a/src/amd/compiler/aco_optimizer.cpp +++ b/src/amd/compiler/aco_optimizer.cpp @@ -2929,7 +2929,7 @@ void optimize(Program* program) label_instruction(ctx, block, instr); } - ctx.uses = std::move(dead_code_analysis(program)); + ctx.uses = dead_code_analysis(program); /* 2. Combine v_mad, omod, clamp and propagate sgpr on VALU instructions */ for (Block& block : program->blocks) {