[llvm] r330260 - [llvm-exegesis] Use LLVMTargetMachine pointer everywhere. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 18 07:22:33 PDT 2018
Author: rksimon
Date: Wed Apr 18 07:22:33 2018
New Revision: 330260
URL: http://llvm.org/viewvc/llvm-project?rev=330260&view=rev
Log:
[llvm-exegesis] Use LLVMTargetMachine pointer everywhere. NFCI.
Avoid calling the unique_ptr multiple times.
Modified:
llvm/trunk/tools/llvm-exegesis/lib/InMemoryAssembler.cpp
Modified: llvm/trunk/tools/llvm-exegesis/lib/InMemoryAssembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-exegesis/lib/InMemoryAssembler.cpp?rev=330260&r1=330259&r2=330260&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-exegesis/lib/InMemoryAssembler.cpp (original)
+++ llvm/trunk/tools/llvm-exegesis/lib/InMemoryAssembler.cpp Wed Apr 18 07:22:33 2018
@@ -206,7 +206,7 @@ JitFunction::JitFunction(JitFunctionCont
ExecEngine.reset(
llvm::EngineBuilder(std::move(FunctionContext.Module))
.setErrorStr(&Error)
- .setMCPU(FunctionContext.TM->getTargetCPU())
+ .setMCPU(TM->getTargetCPU())
.setEngineKind(llvm::EngineKind::JIT)
.setMCJITMemoryManager(
llvm::make_unique<TrackingSectionMemoryManager>(&CodeSize))
More information about the llvm-commits
mailing list