From 7b1bc460fd6ae9bf5efeca62227bb05e0c50ee15 Mon Sep 17 00:00:00 2001 From: Oschowa Date: Fri, 22 May 2020 12:52:05 +0200 Subject: [PATCH] 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: --- src/amd/compiler/aco_optimizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.30.2