Address RVO issue on some compilers
Suppresses pessimizing-move during clang compilation as for some gcc
toolchains RVO is not ensured until C++17 thus an explicit call to
std::move might be required to avoid compilation error for non-copyable
ojects (e.g. std::unique_ptr)
Resolves: COMPMID-3599
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Change-Id: Ie3fa44fb0cf631655aecbeb6c82021a68f500a33
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4230
Reviewed-by: Giorgio Arena <giorgio.arena@arm.com>
Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
diff --git a/src/graph/backends/NEON/NEFunctionFactory.cpp b/src/graph/backends/NEON/NEFunctionFactory.cpp
index b2bd870..6a96f0a 100644
--- a/src/graph/backends/NEON/NEFunctionFactory.cpp
+++ b/src/graph/backends/NEON/NEFunctionFactory.cpp
@@ -32,7 +32,6 @@
#include "arm_compute/graph/nodes/Nodes.h"
#include "arm_compute/runtime/CPP/CPPFunctions.h"
#include "arm_compute/runtime/NEON/NEFunctions.h"
-#include "src/core/NEON/NEKernels.h"
#include "support/Cast.h"
#include "support/ToolchainSupport.h"
@@ -116,7 +115,7 @@
<< " Normalization info: " << norm_info.type()
<< std::endl);
- return RETURN_UNIQUE_PTR(func);
+ return std::move(func);
}
} // namespace detail