[llvm] r339928 - [llvm-mca] Fix -Wpessimizing-move warnings introduced by r339923.
Andrea Di Biagio via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 16 12:45:14 PDT 2018
Author: adibiagio
Date: Thu Aug 16 12:45:13 2018
New Revision: 339928
URL: http://llvm.org/viewvc/llvm-project?rev=339928&view=rev
Log:
[llvm-mca] Fix -Wpessimizing-move warnings introduced by r339923.
Reported by buildbot `clang-with-lto-ubuntu` ( build #9858 ).
Modified:
llvm/trunk/tools/llvm-mca/DispatchStage.cpp
llvm/trunk/tools/llvm-mca/ExecuteStage.cpp
llvm/trunk/tools/llvm-mca/Stage.h
Modified: llvm/trunk/tools/llvm-mca/DispatchStage.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/DispatchStage.cpp?rev=339928&r1=339927&r2=339928&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/DispatchStage.cpp (original)
+++ llvm/trunk/tools/llvm-mca/DispatchStage.cpp Thu Aug 16 12:45:13 2018
@@ -126,7 +126,7 @@ llvm::Error DispatchStage::dispatch(Inst
// Notify listeners of the "instruction dispatched" event,
// and move IR to the next stage.
notifyInstructionDispatched(IR, RegisterFiles);
- return std::move(moveToTheNextStage(IR));
+ return moveToTheNextStage(IR);
}
llvm::Error DispatchStage::cycleStart() {
@@ -148,7 +148,7 @@ bool DispatchStage::isAvailable(const In
llvm::Error DispatchStage::execute(InstRef &IR) {
assert(canDispatch(IR) && "Cannot dispatch another instruction!");
- return std::move(dispatch(IR));
+ return dispatch(IR);
}
#ifndef NDEBUG
Modified: llvm/trunk/tools/llvm-mca/ExecuteStage.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/ExecuteStage.cpp?rev=339928&r1=339927&r2=339928&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/ExecuteStage.cpp (original)
+++ llvm/trunk/tools/llvm-mca/ExecuteStage.cpp Thu Aug 16 12:45:13 2018
@@ -170,7 +170,7 @@ Error ExecuteStage::execute(InstRef &IR)
if (IR.getInstruction()->isExecuted()) {
notifyInstructionExecuted(IR);
//FIXME: add a buffer of executed instructions.
- return std::move(moveToTheNextStage(IR));
+ return moveToTheNextStage(IR);
}
return ErrorSuccess();
}
Modified: llvm/trunk/tools/llvm-mca/Stage.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Stage.h?rev=339928&r1=339927&r2=339928&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Stage.h (original)
+++ llvm/trunk/tools/llvm-mca/Stage.h Thu Aug 16 12:45:13 2018
@@ -69,7 +69,7 @@ public:
/// successor stages.
llvm::Error moveToTheNextStage(InstRef &IR) {
assert(checkNextStage(IR) && "Next stage is not ready!");
- return std::move(NextInSequence->execute(IR));
+ return NextInSequence->execute(IR);
}
/// Add a listener to receive callbacks during the execution of this stage.
More information about the llvm-commits
mailing list