aco: Don't std::move temporary object.
authorOschowa <oschowa@web.de>
Fri, 22 May 2020 10:52:05 +0000 (12:52 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 2 Jun 2020 21:31:17 +0000 (21:31 +0000)
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 <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5228>

src/amd/compiler/aco_optimizer.cpp

index c6228691b36826879e4058d8ab70ecd530db8093..f16f165c21b765a7c1c3fa29c3f350db287f4b96 100644 (file)
@@ -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) {