[llvm] 47bfb42 - [perf] Replace copy-assign by move-assign in llvm/lib/ExecutionEngine/* (#178173)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 27 05:21:15 PST 2026
Author: serge-sans-paille
Date: 2026-01-27T13:21:11Z
New Revision: 47bfb42bed9d7cf0900e2390c6130c0adeed71be
URL: https://github.com/llvm/llvm-project/commit/47bfb42bed9d7cf0900e2390c6130c0adeed71be
DIFF: https://github.com/llvm/llvm-project/commit/47bfb42bed9d7cf0900e2390c6130c0adeed71be.diff
LOG: [perf] Replace copy-assign by move-assign in llvm/lib/ExecutionEngine/* (#178173)
Added:
Modified:
llvm/lib/ExecutionEngine/ExecutionEngine.cpp
llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
llvm/lib/ExecutionEngine/Orc/COFFVCRuntimeSupport.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
index 01456d54465d2..38aed020bb119 100644
--- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -486,7 +486,7 @@ EngineBuilder &EngineBuilder::setMCJITMemoryManager(
std::unique_ptr<RTDyldMemoryManager> mcjmm) {
auto SharedMM = std::shared_ptr<RTDyldMemoryManager>(std::move(mcjmm));
MemMgr = SharedMM;
- Resolver = SharedMM;
+ Resolver = std::move(SharedMM);
return *this;
}
diff --git a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
index 2d69edef878e6..9da7bce76dbf2 100644
--- a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
+++ b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
@@ -860,7 +860,7 @@ void Interpreter::popStackAndReturnValueToCaller(Type *RetTy,
if (ECStack.empty()) { // Finished main. Put result into exit code...
if (RetTy && !RetTy->isVoidTy()) { // Nonvoid return type?
- ExitValue = Result; // Capture the exit value of the program
+ ExitValue = std::move(Result); // Capture the exit value of the program
} else {
memset(&ExitValue.Untyped, 0, sizeof(ExitValue.Untyped));
}
diff --git a/llvm/lib/ExecutionEngine/Orc/COFFVCRuntimeSupport.cpp b/llvm/lib/ExecutionEngine/Orc/COFFVCRuntimeSupport.cpp
index cccb0b996aacb..b47f566b24eb7 100644
--- a/llvm/lib/ExecutionEngine/Orc/COFFVCRuntimeSupport.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/COFFVCRuntimeSupport.cpp
@@ -177,10 +177,10 @@ COFFVCRuntimeBootstrapper::getMSVCToolchainPath() {
MSVCToolchainPath ToolchainPath;
SmallString<256> VCToolchainLib(VCToolChainPath);
sys::path::append(VCToolchainLib, "lib", "x64");
- ToolchainPath.VCToolchainLib = VCToolchainLib;
+ ToolchainPath.VCToolchainLib = std::move(VCToolchainLib);
SmallString<256> UCRTSdkLib(UniversalCRTSdkPath);
sys::path::append(UCRTSdkLib, "Lib", UCRTVersion, "ucrt", "x64");
- ToolchainPath.UCRTSdkLib = UCRTSdkLib;
+ ToolchainPath.UCRTSdkLib = std::move(UCRTSdkLib);
return ToolchainPath;
}
More information about the llvm-commits
mailing list