Remove USE_MCJIT configuration flags, since MC is the only path.
BUG=6051742
This also removes references to MCJIT, since we use MC CodeGen, and not the
actual LLVM MCJIT path.
Change-Id: I3518ae7c91952251a3bd2fc4c3b2a418572a4998
diff --git a/lib/ExecutionEngine/Compiler.cpp b/lib/ExecutionEngine/Compiler.cpp
index 8f29e27..c3ed9b5 100644
--- a/lib/ExecutionEngine/Compiler.cpp
+++ b/lib/ExecutionEngine/Compiler.cpp
@@ -30,9 +30,7 @@
#include "Sha1Helper.h"
#include "CompilerOption.h"
-#if USE_MCJIT
#include "librsloader.h"
-#endif
#include "Transforms/BCCTransforms.h"
@@ -227,9 +225,7 @@
Compiler::Compiler(ScriptCompiled *result)
: mpResult(result),
-#if USE_MCJIT
mRSExecutable(NULL),
-#endif
mpSymbolLookupFn(NULL),
mpSymbolLookupContext(NULL),
mModule(NULL),
@@ -393,7 +389,6 @@
}
// Perform code generation
-#if USE_MCJIT
if (runMCCodeGen(new llvm::TargetData(*TD), TM) != 0) {
goto on_bcc_compile_error;
}
@@ -441,7 +436,7 @@
}
}
-#if DEBUG_MCJIT_DISASSEMBLER
+#if DEBUG_MC_DISASSEMBLER
{
// Get MC codegen emitted function name list
size_t func_list_size = rsloaderGetFuncCount(mRSExecutable);
@@ -453,13 +448,12 @@
void *func = rsloaderGetSymbolAddress(mRSExecutable, func_list[i]);
if (func) {
size_t size = rsloaderGetSymbolSize(mRSExecutable, func_list[i]);
- Disassemble(DEBUG_MCJIT_DISASSEMBLER_FILE,
+ Disassemble(DEBUG_MC_DISASSEMBLER_FILE,
Target, TM, func_list[i], (unsigned char const *)func, size);
}
}
}
#endif
-#endif
on_bcc_compile_error:
// ALOGE("on_bcc_compiler_error");
@@ -480,7 +474,6 @@
}
-#if USE_MCJIT
int Compiler::runMCCodeGen(llvm::TargetData *TD, llvm::TargetMachine *TM) {
// Decorate mEmittedELFExecutable with formatted ostream
llvm::raw_svector_ostream OutSVOS(mEmittedELFExecutable);
@@ -505,7 +498,6 @@
OutSVOS.flush();
return 0;
}
-#endif // USE_MCJIT
int Compiler::runInternalPasses(std::vector<std::string>& Names,
std::vector<uint32_t>& Signatures) {
@@ -651,14 +643,11 @@
}
-#if USE_MCJIT
void *Compiler::getSymbolAddress(char const *name) {
return rsloaderGetSymbolAddress(mRSExecutable, name);
}
-#endif
-#if USE_MCJIT
void *Compiler::resolveSymbolAdapter(void *context, char const *name) {
Compiler *self = reinterpret_cast<Compiler *>(context);
@@ -675,13 +664,10 @@
ALOGE("Unable to resolve symbol: %s\n", name);
return NULL;
}
-#endif
Compiler::~Compiler() {
-#if USE_MCJIT
rsloaderDisposeExec(mRSExecutable);
-#endif
// llvm::llvm_shutdown();
}