From ec51e8ecfea9d81313192fcd25f9767f8203a9ca Mon Sep 17 00:00:00 2001 From: Tim Rowley Date: Mon, 20 Mar 2017 19:44:49 -0500 Subject: swr: [rasterizer jitter] Clean up EngineBuilder construction Reviewed-by: George Kyriazis --- src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/gallium/drivers/swr/rasterizer') diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp index 79118f5f65c..bdb8a52e2fc 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp +++ b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp @@ -106,16 +106,10 @@ JitManager::JitManager(uint32_t simdWidth, const char *arch, const char* core) std::unique_ptr newModule(new Module(fnName.str(), mContext)); mpCurrentModule = newModule.get(); - auto &&EB = EngineBuilder(std::move(newModule)); - EB.setTargetOptions(tOpts); - EB.setOptLevel(CodeGenOpt::Aggressive); - StringRef hostCPUName; hostCPUName = sys::getHostCPUName(); - EB.setMCPU(hostCPUName); - #if defined(_WIN32) // Needed for MCJIT on windows Triple hostTriple(sys::getProcessTriple()); @@ -123,7 +117,11 @@ JitManager::JitManager(uint32_t simdWidth, const char *arch, const char* core) mpCurrentModule->setTargetTriple(hostTriple.getTriple()); #endif // _WIN32 - mpExec = EB.create(); + mpExec = EngineBuilder(std::move(newModule)) + .setTargetOptions(tOpts) + .setOptLevel(CodeGenOpt::Aggressive) + .setMCPU(hostCPUName) + .create(); #if LLVM_USE_INTEL_JITEVENTS JITEventListener *vTune = JITEventListener::createIntelJITEventListener(); -- cgit v1.2.3