[llvm-mca] Fix -Wpessimizing-move warnings introduced by r339923.

Reported by buildbot `clang-with-lto-ubuntu` ( build #9858 ).

llvm-svn: 339928
This commit is contained in:
Andrea Di Biagio 2018-08-16 19:45:13 +00:00
parent 3da2ffb826
commit 998373c059
3 changed files with 4 additions and 4 deletions

View File

@ -126,7 +126,7 @@ llvm::Error DispatchStage::dispatch(InstRef IR) {
// 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 InstRef &IR) const {
llvm::Error DispatchStage::execute(InstRef &IR) {
assert(canDispatch(IR) && "Cannot dispatch another instruction!");
return std::move(dispatch(IR));
return dispatch(IR);
}
#ifndef NDEBUG

View File

@ -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();
}

View File

@ -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.