diff options
author | Stephen Hines <srhines@google.com> | 2014-12-01 14:51:49 -0800 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-12-02 16:08:10 -0800 |
commit | 37ed9c199ca639565f6ce88105f9e39e898d82d0 (patch) | |
tree | 8fb36d3910e3ee4c4e1b7422f4f017108efc52f5 /examples/Kaleidoscope | |
parent | d2327b22152ced7bc46dc629fc908959e8a52d03 (diff) | |
download | external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.zip external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.tar.gz external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.tar.bz2 |
Update aosp/master LLVM for rebase to r222494.
Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
Diffstat (limited to 'examples/Kaleidoscope')
-rw-r--r-- | examples/Kaleidoscope/Chapter4/CMakeLists.txt | 2 | ||||
-rw-r--r-- | examples/Kaleidoscope/Chapter4/Makefile | 2 | ||||
-rw-r--r-- | examples/Kaleidoscope/Chapter4/toy.cpp | 9 | ||||
-rw-r--r-- | examples/Kaleidoscope/Chapter5/CMakeLists.txt | 2 | ||||
-rw-r--r-- | examples/Kaleidoscope/Chapter5/Makefile | 2 | ||||
-rw-r--r-- | examples/Kaleidoscope/Chapter5/toy.cpp | 9 | ||||
-rw-r--r-- | examples/Kaleidoscope/Chapter6/CMakeLists.txt | 2 | ||||
-rw-r--r-- | examples/Kaleidoscope/Chapter6/Makefile | 2 | ||||
-rw-r--r-- | examples/Kaleidoscope/Chapter6/toy.cpp | 9 | ||||
-rw-r--r-- | examples/Kaleidoscope/Chapter7/CMakeLists.txt | 2 | ||||
-rw-r--r-- | examples/Kaleidoscope/Chapter7/Makefile | 2 | ||||
-rw-r--r-- | examples/Kaleidoscope/Chapter7/toy.cpp | 9 | ||||
-rw-r--r-- | examples/Kaleidoscope/MCJIT/cached/toy-jit.cpp | 1 | ||||
-rw-r--r-- | examples/Kaleidoscope/MCJIT/cached/toy.cpp | 1 | ||||
-rw-r--r-- | examples/Kaleidoscope/MCJIT/complete/toy.cpp | 129 | ||||
-rw-r--r-- | examples/Kaleidoscope/MCJIT/initial/toy.cpp | 1 | ||||
-rw-r--r-- | examples/Kaleidoscope/MCJIT/lazy/toy-jit.cpp | 1 | ||||
-rw-r--r-- | examples/Kaleidoscope/MCJIT/lazy/toy.cpp | 1 |
18 files changed, 36 insertions, 150 deletions
diff --git a/examples/Kaleidoscope/Chapter4/CMakeLists.txt b/examples/Kaleidoscope/Chapter4/CMakeLists.txt index 72a9f05..2f828dc 100644 --- a/examples/Kaleidoscope/Chapter4/CMakeLists.txt +++ b/examples/Kaleidoscope/Chapter4/CMakeLists.txt @@ -3,7 +3,7 @@ set(LLVM_LINK_COMPONENTS Core ExecutionEngine InstCombine - JIT + MC ScalarOpts Support nativecodegen diff --git a/examples/Kaleidoscope/Chapter4/Makefile b/examples/Kaleidoscope/Chapter4/Makefile index 30162d9..6d6a670 100644 --- a/examples/Kaleidoscope/Chapter4/Makefile +++ b/examples/Kaleidoscope/Chapter4/Makefile @@ -10,6 +10,6 @@ LEVEL = ../../.. TOOLNAME = Kaleidoscope-Ch4 EXAMPLE_TOOL = 1 -LINK_COMPONENTS := core jit native +LINK_COMPONENTS := core mcjit native include $(LEVEL)/Makefile.common diff --git a/examples/Kaleidoscope/Chapter4/toy.cpp b/examples/Kaleidoscope/Chapter4/toy.cpp index a8f5942..3564d75 100644 --- a/examples/Kaleidoscope/Chapter4/toy.cpp +++ b/examples/Kaleidoscope/Chapter4/toy.cpp @@ -1,6 +1,5 @@ #include "llvm/Analysis/Passes.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" -#include "llvm/ExecutionEngine/JIT.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/IRBuilder.h" @@ -572,11 +571,13 @@ int main() { getNextToken(); // Make the module, which holds all the code. - TheModule = new Module("my cool jit", Context); + std::unique_ptr<Module> Owner = make_unique<Module>("my cool jit", Context); + TheModule = Owner.get(); // Create the JIT. This takes ownership of the module. std::string ErrStr; - TheExecutionEngine = EngineBuilder(TheModule).setErrorStr(&ErrStr).create(); + TheExecutionEngine = + EngineBuilder(std::move(Owner)).setErrorStr(&ErrStr).create(); if (!TheExecutionEngine) { fprintf(stderr, "Could not create ExecutionEngine: %s\n", ErrStr.c_str()); exit(1); @@ -587,7 +588,7 @@ int main() { // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. TheModule->setDataLayout(TheExecutionEngine->getDataLayout()); - OurFPM.add(new DataLayoutPass(TheModule)); + OurFPM.add(new DataLayoutPass()); // Provide basic AliasAnalysis support for GVN. OurFPM.add(createBasicAliasAnalysisPass()); // Do simple "peephole" optimizations and bit-twiddling optzns. diff --git a/examples/Kaleidoscope/Chapter5/CMakeLists.txt b/examples/Kaleidoscope/Chapter5/CMakeLists.txt index c7d0276..1912ddc 100644 --- a/examples/Kaleidoscope/Chapter5/CMakeLists.txt +++ b/examples/Kaleidoscope/Chapter5/CMakeLists.txt @@ -3,7 +3,7 @@ set(LLVM_LINK_COMPONENTS Core ExecutionEngine InstCombine - JIT + MC ScalarOpts Support nativecodegen diff --git a/examples/Kaleidoscope/Chapter5/Makefile b/examples/Kaleidoscope/Chapter5/Makefile index d1f5e20..d780967 100644 --- a/examples/Kaleidoscope/Chapter5/Makefile +++ b/examples/Kaleidoscope/Chapter5/Makefile @@ -10,6 +10,6 @@ LEVEL = ../../.. TOOLNAME = Kaleidoscope-Ch5 EXAMPLE_TOOL = 1 -LINK_COMPONENTS := core jit native +LINK_COMPONENTS := core mcjit native include $(LEVEL)/Makefile.common diff --git a/examples/Kaleidoscope/Chapter5/toy.cpp b/examples/Kaleidoscope/Chapter5/toy.cpp index a31b5b4..4929a20 100644 --- a/examples/Kaleidoscope/Chapter5/toy.cpp +++ b/examples/Kaleidoscope/Chapter5/toy.cpp @@ -1,6 +1,5 @@ #include "llvm/Analysis/Passes.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" -#include "llvm/ExecutionEngine/JIT.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/IRBuilder.h" @@ -817,11 +816,13 @@ int main() { getNextToken(); // Make the module, which holds all the code. - TheModule = new Module("my cool jit", Context); + std::unique_ptr<Module> Owner = make_unique<Module>("my cool jit", Context); + TheModule = Owner.get(); // Create the JIT. This takes ownership of the module. std::string ErrStr; - TheExecutionEngine = EngineBuilder(TheModule).setErrorStr(&ErrStr).create(); + TheExecutionEngine = + EngineBuilder(std::move(Owner)).setErrorStr(&ErrStr).create(); if (!TheExecutionEngine) { fprintf(stderr, "Could not create ExecutionEngine: %s\n", ErrStr.c_str()); exit(1); @@ -832,7 +833,7 @@ int main() { // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. TheModule->setDataLayout(TheExecutionEngine->getDataLayout()); - OurFPM.add(new DataLayoutPass(TheModule)); + OurFPM.add(new DataLayoutPass()); // Provide basic AliasAnalysis support for GVN. OurFPM.add(createBasicAliasAnalysisPass()); // Do simple "peephole" optimizations and bit-twiddling optzns. diff --git a/examples/Kaleidoscope/Chapter6/CMakeLists.txt b/examples/Kaleidoscope/Chapter6/CMakeLists.txt index 669c7eb..d36f030 100644 --- a/examples/Kaleidoscope/Chapter6/CMakeLists.txt +++ b/examples/Kaleidoscope/Chapter6/CMakeLists.txt @@ -3,7 +3,7 @@ set(LLVM_LINK_COMPONENTS Core ExecutionEngine InstCombine - JIT + MC ScalarOpts Support nativecodegen diff --git a/examples/Kaleidoscope/Chapter6/Makefile b/examples/Kaleidoscope/Chapter6/Makefile index a5fbcbd..8f47ea0 100644 --- a/examples/Kaleidoscope/Chapter6/Makefile +++ b/examples/Kaleidoscope/Chapter6/Makefile @@ -10,6 +10,6 @@ LEVEL = ../../.. TOOLNAME = Kaleidoscope-Ch6 EXAMPLE_TOOL = 1 -LINK_COMPONENTS := core jit native +LINK_COMPONENTS := core mcjit native include $(LEVEL)/Makefile.common diff --git a/examples/Kaleidoscope/Chapter6/toy.cpp b/examples/Kaleidoscope/Chapter6/toy.cpp index 5a3bd2e..06da9ac 100644 --- a/examples/Kaleidoscope/Chapter6/toy.cpp +++ b/examples/Kaleidoscope/Chapter6/toy.cpp @@ -1,6 +1,5 @@ #include "llvm/Analysis/Passes.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" -#include "llvm/ExecutionEngine/JIT.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/IRBuilder.h" @@ -935,11 +934,13 @@ int main() { getNextToken(); // Make the module, which holds all the code. - TheModule = new Module("my cool jit", Context); + std::unique_ptr<Module> Owner = make_unique<Module>("my cool jit", Context); + TheModule = Owner.get(); // Create the JIT. This takes ownership of the module. std::string ErrStr; - TheExecutionEngine = EngineBuilder(TheModule).setErrorStr(&ErrStr).create(); + TheExecutionEngine = + EngineBuilder(std::move(Owner)).setErrorStr(&ErrStr).create(); if (!TheExecutionEngine) { fprintf(stderr, "Could not create ExecutionEngine: %s\n", ErrStr.c_str()); exit(1); @@ -950,7 +951,7 @@ int main() { // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. TheModule->setDataLayout(TheExecutionEngine->getDataLayout()); - OurFPM.add(new DataLayoutPass(TheModule)); + OurFPM.add(new DataLayoutPass()); // Provide basic AliasAnalysis support for GVN. OurFPM.add(createBasicAliasAnalysisPass()); // Do simple "peephole" optimizations and bit-twiddling optzns. diff --git a/examples/Kaleidoscope/Chapter7/CMakeLists.txt b/examples/Kaleidoscope/Chapter7/CMakeLists.txt index 0a0c8e7..bdc0e55 100644 --- a/examples/Kaleidoscope/Chapter7/CMakeLists.txt +++ b/examples/Kaleidoscope/Chapter7/CMakeLists.txt @@ -3,7 +3,7 @@ set(LLVM_LINK_COMPONENTS Core ExecutionEngine InstCombine - JIT + MC ScalarOpts Support TransformUtils diff --git a/examples/Kaleidoscope/Chapter7/Makefile b/examples/Kaleidoscope/Chapter7/Makefile index 6cec323..7abeb3e 100644 --- a/examples/Kaleidoscope/Chapter7/Makefile +++ b/examples/Kaleidoscope/Chapter7/Makefile @@ -11,6 +11,6 @@ TOOLNAME = Kaleidoscope-Ch7 EXAMPLE_TOOL = 1 REQUIRES_RTTI := 1 -LINK_COMPONENTS := core jit native +LINK_COMPONENTS := core mcjit native include $(LEVEL)/Makefile.common diff --git a/examples/Kaleidoscope/Chapter7/toy.cpp b/examples/Kaleidoscope/Chapter7/toy.cpp index c2c337c..56a6fa9 100644 --- a/examples/Kaleidoscope/Chapter7/toy.cpp +++ b/examples/Kaleidoscope/Chapter7/toy.cpp @@ -1,6 +1,5 @@ #include "llvm/Analysis/Passes.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" -#include "llvm/ExecutionEngine/JIT.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/IRBuilder.h" @@ -1099,11 +1098,13 @@ int main() { getNextToken(); // Make the module, which holds all the code. - TheModule = new Module("my cool jit", Context); + std::unique_ptr<Module> Owner = make_unique<Module>("my cool jit", Context); + TheModule = Owner.get(); // Create the JIT. This takes ownership of the module. std::string ErrStr; - TheExecutionEngine = EngineBuilder(TheModule).setErrorStr(&ErrStr).create(); + TheExecutionEngine = + EngineBuilder(std::move(Owner)).setErrorStr(&ErrStr).create(); if (!TheExecutionEngine) { fprintf(stderr, "Could not create ExecutionEngine: %s\n", ErrStr.c_str()); exit(1); @@ -1114,7 +1115,7 @@ int main() { // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. TheModule->setDataLayout(TheExecutionEngine->getDataLayout()); - OurFPM.add(new DataLayoutPass(TheModule)); + OurFPM.add(new DataLayoutPass()); // Provide basic AliasAnalysis support for GVN. OurFPM.add(createBasicAliasAnalysisPass()); // Promote allocas to registers. diff --git a/examples/Kaleidoscope/MCJIT/cached/toy-jit.cpp b/examples/Kaleidoscope/MCJIT/cached/toy-jit.cpp index 9466360..00f5b83 100644 --- a/examples/Kaleidoscope/MCJIT/cached/toy-jit.cpp +++ b/examples/Kaleidoscope/MCJIT/cached/toy-jit.cpp @@ -2,7 +2,6 @@ #include "llvm/Analysis/Passes.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" -#include "llvm/ExecutionEngine/JIT.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/IRBuilder.h" diff --git a/examples/Kaleidoscope/MCJIT/cached/toy.cpp b/examples/Kaleidoscope/MCJIT/cached/toy.cpp index 16c548c..af51b4a 100644 --- a/examples/Kaleidoscope/MCJIT/cached/toy.cpp +++ b/examples/Kaleidoscope/MCJIT/cached/toy.cpp @@ -897,7 +897,6 @@ ExecutionEngine *MCJITHelper::compileModule(Module *M) { std::string ErrStr; ExecutionEngine *NewEngine = EngineBuilder(M) .setErrorStr(&ErrStr) - .setUseMCJIT(true) .setMCJITMemoryManager(new HelpingMemoryManager(this)) .create(); if (!NewEngine) { diff --git a/examples/Kaleidoscope/MCJIT/complete/toy.cpp b/examples/Kaleidoscope/MCJIT/complete/toy.cpp index 10e7ada..3beb0d8 100644 --- a/examples/Kaleidoscope/MCJIT/complete/toy.cpp +++ b/examples/Kaleidoscope/MCJIT/complete/toy.cpp @@ -1,6 +1,5 @@ #include "llvm/Analysis/Passes.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" -#include "llvm/ExecutionEngine/JIT.h" #include "llvm/ExecutionEngine/MCJIT.h" #include "llvm/ExecutionEngine/ObjectCache.h" #include "llvm/ExecutionEngine/SectionMemoryManager.h" @@ -52,10 +51,6 @@ namespace { cl::desc("Dump IR from modules to stderr on shutdown"), cl::init(false)); - cl::opt<bool> UseMCJIT( - "use-mcjit", cl::desc("Use the MCJIT execution engine"), - cl::init(true)); - cl::opt<bool> EnableLazyCompilation( "enable-lazy-compilation", cl::desc("Enable lazy compilation when using the MCJIT engine"), cl::init(true)); @@ -793,96 +788,6 @@ public: }; //===----------------------------------------------------------------------===// -// Helper class for JIT execution engine -//===----------------------------------------------------------------------===// - -class JITHelper : public BaseHelper { -public: - JITHelper(LLVMContext &Context) { - // Make the module, which holds all the code. - if (!InputIR.empty()) { - TheModule = parseInputIR(InputIR, Context); - } else { - TheModule = new Module("my cool jit", Context); - } - - // Create the JIT. This takes ownership of the module. - std::string ErrStr; - TheExecutionEngine = EngineBuilder(TheModule).setErrorStr(&ErrStr).create(); - if (!TheExecutionEngine) { - fprintf(stderr, "Could not create ExecutionEngine: %s\n", ErrStr.c_str()); - exit(1); - } - - TheFPM = new FunctionPassManager(TheModule); - - // Set up the optimizer pipeline. Start with registering info about how the - // target lays out data structures. - TheFPM->add(new DataLayout(*TheExecutionEngine->getDataLayout())); - // Provide basic AliasAnalysis support for GVN. - TheFPM->add(createBasicAliasAnalysisPass()); - // Promote allocas to registers. - TheFPM->add(createPromoteMemoryToRegisterPass()); - // Do simple "peephole" optimizations and bit-twiddling optzns. - TheFPM->add(createInstructionCombiningPass()); - // Reassociate expressions. - TheFPM->add(createReassociatePass()); - // Eliminate Common SubExpressions. - TheFPM->add(createGVNPass()); - // Simplify the control flow graph (deleting unreachable blocks, etc). - TheFPM->add(createCFGSimplificationPass()); - - TheFPM->doInitialization(); - } - - virtual ~JITHelper() { - if (TheFPM) - delete TheFPM; - if (TheExecutionEngine) - delete TheExecutionEngine; - } - - virtual Function *getFunction(const std::string FnName) { - assert(TheModule); - return TheModule->getFunction(FnName); - } - - virtual Module *getModuleForNewFunction() { - assert(TheModule); - return TheModule; - } - - virtual void *getPointerToFunction(Function* F) { - assert(TheExecutionEngine); - return TheExecutionEngine->getPointerToFunction(F); - } - - virtual void *getPointerToNamedFunction(const std::string &Name) { - return TheExecutionEngine->getPointerToNamedFunction(Name); - } - - virtual void runFPM(Function &F) { - assert(TheFPM); - TheFPM->run(F); - } - - virtual void closeCurrentModule() { - // This should never be called for JIT - assert(false); - } - - virtual void dump() { - assert(TheModule); - TheModule->dump(); - } - -private: - Module *TheModule; - ExecutionEngine *TheExecutionEngine; - FunctionPassManager *TheFPM; -}; - -//===----------------------------------------------------------------------===// // MCJIT helper class //===----------------------------------------------------------------------===// @@ -1034,7 +939,6 @@ ExecutionEngine *MCJITHelper::compileModule(Module *M) { std::string ErrStr; ExecutionEngine *EE = EngineBuilder(M) .setErrorStr(&ErrStr) - .setUseMCJIT(true) .setMCJITMemoryManager(new HelpingMemoryManager(this)) .create(); if (!EE) { @@ -1194,10 +1098,8 @@ Value *UnaryExprAST::Codegen() { Value *OperandV = Operand->Codegen(); if (OperandV == 0) return 0; Function *F; - if (UseMCJIT) - F = TheHelper->getFunction(MakeLegalFunctionName(std::string("unary")+Opcode)); - else - F = TheHelper->getFunction(std::string("unary")+Opcode); + F = TheHelper->getFunction( + MakeLegalFunctionName(std::string("unary") + Opcode)); if (F == 0) return ErrorV("Unknown unary operator"); @@ -1246,10 +1148,7 @@ Value *BinaryExprAST::Codegen() { // If it wasn't a builtin binary operator, it must be a user defined one. Emit // a call to it. Function *F; - if (UseMCJIT) - F = TheHelper->getFunction(MakeLegalFunctionName(std::string("binary")+Op)); - else - F = TheHelper->getFunction(std::string("binary")+Op); + F = TheHelper->getFunction(MakeLegalFunctionName(std::string("binary")+Op)); assert(F && "binary operator not found!"); Value *Ops[] = { L, R }; @@ -1482,10 +1381,7 @@ Function *PrototypeAST::Codegen() { Doubles, false); std::string FnName; - if (UseMCJIT) - FnName = MakeLegalFunctionName(Name); - else - FnName = Name; + FnName = MakeLegalFunctionName(Name); Module* M = TheHelper->getModuleForNewFunction(); Function *F = Function::Create(FT, Function::ExternalLinkage, FnName, M); @@ -1560,10 +1456,6 @@ Function *FunctionAST::Codegen() { // Validate the generated code, checking for consistency. verifyFunction(*TheFunction); - // Optimize the function. - if (!UseMCJIT) - TheHelper->runFPM(*TheFunction); - return TheFunction; } @@ -1581,7 +1473,7 @@ Function *FunctionAST::Codegen() { static void HandleDefinition() { if (FunctionAST *F = ParseDefinition()) { - if (UseMCJIT && EnableLazyCompilation) + if (EnableLazyCompilation) TheHelper->closeCurrentModule(); Function *LF = F->Codegen(); if (LF && VerboseOutput) { @@ -1671,10 +1563,8 @@ double printlf() { int main(int argc, char **argv) { InitializeNativeTarget(); - if (UseMCJIT) { - InitializeNativeTargetAsmPrinter(); - InitializeNativeTargetAsmParser(); - } + InitializeNativeTargetAsmPrinter(); + InitializeNativeTargetAsmParser(); LLVMContext &Context = getGlobalContext(); cl::ParseCommandLineOptions(argc, argv, @@ -1690,10 +1580,7 @@ int main(int argc, char **argv) { BinopPrecedence['*'] = 40; // highest. // Make the Helper, which holds all the code. - if (UseMCJIT) - TheHelper = new MCJITHelper(Context); - else - TheHelper = new JITHelper(Context); + TheHelper = new MCJITHelper(Context); // Prime the first token. if (!SuppressPrompts) diff --git a/examples/Kaleidoscope/MCJIT/initial/toy.cpp b/examples/Kaleidoscope/MCJIT/initial/toy.cpp index 4c47113..2c1b297 100644 --- a/examples/Kaleidoscope/MCJIT/initial/toy.cpp +++ b/examples/Kaleidoscope/MCJIT/initial/toy.cpp @@ -778,7 +778,6 @@ void *MCJITHelper::getPointerToFunction(Function* F) { std::string ErrStr; ExecutionEngine *NewEngine = EngineBuilder(OpenModule) .setErrorStr(&ErrStr) - .setUseMCJIT(true) .setMCJITMemoryManager(new HelpingMemoryManager(this)) .create(); if (!NewEngine) { diff --git a/examples/Kaleidoscope/MCJIT/lazy/toy-jit.cpp b/examples/Kaleidoscope/MCJIT/lazy/toy-jit.cpp index 2d540dd..98c1001 100644 --- a/examples/Kaleidoscope/MCJIT/lazy/toy-jit.cpp +++ b/examples/Kaleidoscope/MCJIT/lazy/toy-jit.cpp @@ -2,7 +2,6 @@ #include "llvm/Analysis/Passes.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" -#include "llvm/ExecutionEngine/JIT.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/IRBuilder.h" diff --git a/examples/Kaleidoscope/MCJIT/lazy/toy.cpp b/examples/Kaleidoscope/MCJIT/lazy/toy.cpp index ff88e23..9c2a0d4 100644 --- a/examples/Kaleidoscope/MCJIT/lazy/toy.cpp +++ b/examples/Kaleidoscope/MCJIT/lazy/toy.cpp @@ -808,7 +808,6 @@ ExecutionEngine *MCJITHelper::compileModule(Module *M) { std::string ErrStr; ExecutionEngine *NewEngine = EngineBuilder(M) .setErrorStr(&ErrStr) - .setUseMCJIT(true) .setMCJITMemoryManager(new HelpingMemoryManager(this)) .create(); if (!NewEngine) { |