jit: Remove LLLazyJIT and LLJIT variant. Stick to LLJIT for now
This commit is contained in:
parent
6ec0a26a51
commit
1ef8a5f0ca
|
@ -162,7 +162,7 @@ int JIT::getOptimizatioLevel() const {
|
||||||
|
|
||||||
llvm::Error JIT::createCurrentProcessJD() {
|
llvm::Error JIT::createCurrentProcessJD() {
|
||||||
|
|
||||||
auto &es = WITH_ENGINE(auto &, getExecutionSession());
|
auto &es = engine->getExecutionSession();
|
||||||
auto *processJDPtr = es.getJITDylibByName(MAIN_PROCESS_JD_NAME);
|
auto *processJDPtr = es.getJITDylibByName(MAIN_PROCESS_JD_NAME);
|
||||||
|
|
||||||
if (processJDPtr != nullptr) {
|
if (processJDPtr != nullptr) {
|
||||||
|
@ -178,7 +178,7 @@ llvm::Error JIT::createCurrentProcessJD() {
|
||||||
|
|
||||||
auto generator =
|
auto generator =
|
||||||
llvm::orc::DynamicLibrarySearchGenerator::GetForCurrentProcess(
|
llvm::orc::DynamicLibrarySearchGenerator::GetForCurrentProcess(
|
||||||
WITH_ENGINE(const auto &, getDataLayout()).getGlobalPrefix());
|
engine->getDataLayout().getGlobalPrefix());
|
||||||
|
|
||||||
if (!generator) {
|
if (!generator) {
|
||||||
return generator.takeError();
|
return generator.takeError();
|
||||||
|
|
|
@ -63,15 +63,6 @@ class LLLazyJIT;
|
||||||
#define JIT_LOG(...) \
|
#define JIT_LOG(...) \
|
||||||
DEBUG_WITH_TYPE("JIT", llvm::dbgs() << "[JIT]: " << __VA_ARGS__ << "\n");
|
DEBUG_WITH_TYPE("JIT", llvm::dbgs() << "[JIT]: " << __VA_ARGS__ << "\n");
|
||||||
|
|
||||||
/// A simple macro that we need to use to call those member functions that are
|
|
||||||
/// shared between LLJIT and LLLAZYJIT. This macro supposed to be used
|
|
||||||
/// only within the JIT class itself. The first argument is the return type
|
|
||||||
/// of the member function and the second arg is the member function call.
|
|
||||||
/// The whole point of this macro is to unwrap the variant type and call
|
|
||||||
/// the shared member function on the unwraped value.
|
|
||||||
#define WITH_ENGINE(retType, fnCall) \
|
|
||||||
std::visit([](auto &e) -> retType { return e->fnCall; }, engine)
|
|
||||||
|
|
||||||
namespace orc = llvm::orc;
|
namespace orc = llvm::orc;
|
||||||
|
|
||||||
namespace serene::jit {
|
namespace serene::jit {
|
||||||
|
@ -103,8 +94,7 @@ private:
|
||||||
class JIT {
|
class JIT {
|
||||||
std::unique_ptr<const Options> options;
|
std::unique_ptr<const Options> options;
|
||||||
|
|
||||||
std::variant<std::unique_ptr<orc::LLJIT>, std::unique_ptr<orc::LLLazyJIT>>
|
std::unique_ptr<orc::LLJIT> engine;
|
||||||
engine;
|
|
||||||
std::unique_ptr<ObjectCache> cache;
|
std::unique_ptr<ObjectCache> cache;
|
||||||
|
|
||||||
llvm::JITEventListener *gdbListener;
|
llvm::JITEventListener *gdbListener;
|
||||||
|
|
Loading…
Reference in New Issue