Skip to content

Commit 2f34923

Browse files
committed
Revert "apacheGH-37848: [C++][Gandiva] Migrate LLVM JIT engine from MCJIT to ORC v2/LLJIT (apache#39098)"
This reverts commit 83cba25.
1 parent 4e33b10 commit 2f34923

18 files changed

+199
-441
lines changed

cpp/cmake_modules/FindLLVMAlt.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ if(LLVM_FOUND)
9393
debuginfodwarf
9494
ipo
9595
linker
96+
mcjit
9697
native
97-
orcjit
9898
target)
9999
if(LLVM_VERSION_MAJOR GREATER_EQUAL 14)
100100
list(APPEND LLVM_TARGET_COMPONENTS passes)

cpp/src/gandiva/configuration.h

+2-15
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,10 @@ class GANDIVA_EXPORT Configuration {
3737

3838
explicit Configuration(bool optimize,
3939
std::shared_ptr<FunctionRegistry> function_registry =
40-
gandiva::default_function_registry(),
41-
bool dump_ir = false)
40+
gandiva::default_function_registry())
4241
: optimize_(optimize),
4342
target_host_cpu_(true),
44-
function_registry_(std::move(function_registry)),
45-
dump_ir_(dump_ir) {}
43+
function_registry_(function_registry) {}
4644

4745
Configuration() : Configuration(true) {}
4846

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

5351
bool optimize() const { return optimize_; }
5452
bool target_host_cpu() const { return target_host_cpu_; }
55-
bool dump_ir() const { return dump_ir_; }
5653
std::shared_ptr<FunctionRegistry> function_registry() const {
5754
return function_registry_;
5855
}
5956

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

7770
/// \brief configuration builder for gandiva
@@ -90,12 +83,6 @@ class GANDIVA_EXPORT ConfigurationBuilder {
9083
return configuration;
9184
}
9285

93-
std::shared_ptr<Configuration> build_with_ir_dumping(bool dump_ir) {
94-
std::shared_ptr<Configuration> configuration(
95-
new Configuration(true, gandiva::default_function_registry(), dump_ir));
96-
return configuration;
97-
}
98-
9986
std::shared_ptr<Configuration> build(
10087
std::shared_ptr<FunctionRegistry> function_registry) {
10188
std::shared_ptr<Configuration> configuration(

0 commit comments

Comments
 (0)