Skip to content

Commit

Permalink
Revert "apacheGH-37848: [C++][Gandiva] Migrate LLVM JIT engine from M…
Browse files Browse the repository at this point in the history
…CJIT to ORC v2/LLJIT (apache#39098)"

This reverts commit 83cba25.
  • Loading branch information
lriggs committed Mar 20, 2024
1 parent 4e33b10 commit 2f34923
Show file tree
Hide file tree
Showing 18 changed files with 199 additions and 441 deletions.
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

0 comments on commit 2f34923

Please sign in to comment.