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() {
|
||||
|
||||
auto &es = WITH_ENGINE(auto &, getExecutionSession());
|
||||
auto &es = engine->getExecutionSession();
|
||||
auto *processJDPtr = es.getJITDylibByName(MAIN_PROCESS_JD_NAME);
|
||||
|
||||
if (processJDPtr != nullptr) {
|
||||
|
@ -178,7 +178,7 @@ llvm::Error JIT::createCurrentProcessJD() {
|
|||
|
||||
auto generator =
|
||||
llvm::orc::DynamicLibrarySearchGenerator::GetForCurrentProcess(
|
||||
WITH_ENGINE(const auto &, getDataLayout()).getGlobalPrefix());
|
||||
engine->getDataLayout().getGlobalPrefix());
|
||||
|
||||
if (!generator) {
|
||||
return generator.takeError();
|
||||
|
|
|
@ -63,15 +63,6 @@ class LLLazyJIT;
|
|||
#define JIT_LOG(...) \
|
||||
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 serene::jit {
|
||||
|
@ -103,8 +94,7 @@ private:
|
|||
class JIT {
|
||||
std::unique_ptr<const Options> options;
|
||||
|
||||
std::variant<std::unique_ptr<orc::LLJIT>, std::unique_ptr<orc::LLLazyJIT>>
|
||||
engine;
|
||||
std::unique_ptr<orc::LLJIT> engine;
|
||||
std::unique_ptr<ObjectCache> cache;
|
||||
|
||||
llvm::JITEventListener *gdbListener;
|
||||
|
|
Loading…
Reference in New Issue