projjal commented on a change in pull request #9833:
URL: https://github.com/apache/arrow/pull/9833#discussion_r608610238
##########
File path: cpp/src/gandiva/engine.cc
##########
@@ -133,13 +132,17 @@ Status Engine::Make(const std::shared_ptr<Configuration>&
conf,
// ExecutionEngine but only for the lifetime of the builder. Found by
// inspecting LLVM sources.
std::string builder_error;
- std::unique_ptr<llvm::ExecutionEngine> exec_engine{
- llvm::EngineBuilder(std::move(module))
- .setMCPU(llvm::sys::getHostCPUName())
- .setEngineKind(llvm::EngineKind::JIT)
- .setOptLevel(opt_level)
- .setErrorStr(&builder_error)
- .create()};
+
+ llvm::EngineBuilder engine_builder(std::move(module));
+
+ engine_builder.setEngineKind(llvm::EngineKind::JIT)
+ .setOptLevel(opt_level)
+ .setErrorStr(&builder_error);
+
+ if (conf->target_host_cpu()) {
+ engine_builder.setMCPU(llvm::sys::getHostCPUName());
Review comment:
It won't use the cpu specific features (eg avx instructions)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]