Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-45132: [C++][Gandiva] Revert LLVM JIT upgrade #45114

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cpp/cmake_modules/FindLLVMAlt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ if(LLVM_FOUND)
debuginfodwarf
ipo
linker
mcjit
native
orcjit
target)
if(LLVM_VERSION_MAJOR GREATER_EQUAL 14)
list(APPEND LLVM_TARGET_COMPONENTS passes)
Expand Down
17 changes: 2 additions & 15 deletions cpp/src/gandiva/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,10 @@ class GANDIVA_EXPORT Configuration {

explicit Configuration(bool optimize,
std::shared_ptr<FunctionRegistry> function_registry =
gandiva::default_function_registry(),
bool dump_ir = false)
gandiva::default_function_registry())
: optimize_(optimize),
target_host_cpu_(true),
function_registry_(std::move(function_registry)),
dump_ir_(dump_ir) {}
function_registry_(function_registry) {}

Configuration() : Configuration(true) {}

Expand All @@ -52,13 +50,11 @@ class GANDIVA_EXPORT Configuration {

bool optimize() const { return optimize_; }
bool target_host_cpu() const { return target_host_cpu_; }
bool dump_ir() const { return dump_ir_; }
std::shared_ptr<FunctionRegistry> function_registry() const {
return function_registry_;
}

void set_optimize(bool optimize) { optimize_ = optimize; }
void set_dump_ir(bool dump_ir) { dump_ir_ = dump_ir; }
void target_host_cpu(bool target_host_cpu) { target_host_cpu_ = target_host_cpu; }
void set_function_registry(std::shared_ptr<FunctionRegistry> function_registry) {
function_registry_ = std::move(function_registry);
Expand All @@ -69,9 +65,6 @@ class GANDIVA_EXPORT Configuration {
bool target_host_cpu_; /* set the mcpu flag to host cpu while compiling llvm ir */
std::shared_ptr<FunctionRegistry>
function_registry_; /* function registry that may contain external functions */
// flag indicating if IR dumping is needed, defaults to false, and turning it on will
// negatively affect performance
bool dump_ir_ = false;
};

/// \brief configuration builder for gandiva
Expand All @@ -90,12 +83,6 @@ class GANDIVA_EXPORT ConfigurationBuilder {
return configuration;
}

std::shared_ptr<Configuration> build_with_ir_dumping(bool dump_ir) {
std::shared_ptr<Configuration> configuration(
new Configuration(true, gandiva::default_function_registry(), dump_ir));
return configuration;
}

std::shared_ptr<Configuration> build(
std::shared_ptr<FunctionRegistry> function_registry) {
std::shared_ptr<Configuration> configuration(
Expand Down
Loading
Loading