diff options
author | Eric Christopher <echristo@gmail.com> | 2014-09-02 22:28:02 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2014-09-02 22:28:02 +0000 |
commit | 79cc1e3ae7bc224fa948495ba2f1c02f4c0c84ea (patch) | |
tree | b7044eef1251f66d6308e6868b0430ac6a8a7297 /llvm/lib/ExecutionEngine/ExecutionEngine.cpp | |
parent | 981602a84c5e16871d23b946c8334cd830aceed2 (diff) | |
download | bcm5719-llvm-79cc1e3ae7bc224fa948495ba2f1c02f4c0c84ea.tar.gz bcm5719-llvm-79cc1e3ae7bc224fa948495ba2f1c02f4c0c84ea.zip |
Reinstate "Nuke the old JIT."
Approved by Jim Grosbach, Lang Hames, Rafael Espindola.
This reinstates commits r215111, 215115, 215116, 215117, 215136.
llvm-svn: 216982
Diffstat (limited to 'llvm/lib/ExecutionEngine/ExecutionEngine.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/ExecutionEngine.cpp | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp index a73d8ca8a2b..315dee4944c 100644 --- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp @@ -48,12 +48,6 @@ void ObjectCache::anchor() {} void ObjectBuffer::anchor() {} void ObjectBufferStream::anchor() {} -ExecutionEngine *(*ExecutionEngine::JITCtor)( - std::unique_ptr<Module> M, - std::string *ErrorStr, - JITMemoryManager *JMM, - bool GVsWithCode, - TargetMachine *TM) = nullptr; ExecutionEngine *(*ExecutionEngine::MCJITCtor)( std::unique_ptr<Module >M, std::string *ErrorStr, @@ -411,10 +405,8 @@ void EngineBuilder::InitEngine() { MCJMM = nullptr; JMM = nullptr; Options = TargetOptions(); - AllocateGVsWithCode = false; RelocModel = Reloc::Default; CMModel = CodeModel::JITDefault; - UseMCJIT = false; // IR module verification is enabled by default in debug builds, and disabled // by default in release builds. @@ -447,14 +439,6 @@ ExecutionEngine *EngineBuilder::create(TargetMachine *TM) { return nullptr; } } - - if (MCJMM && ! UseMCJIT) { - if (ErrorStr) - *ErrorStr = - "Cannot create a legacy JIT with a runtime dyld memory " - "manager."; - return nullptr; - } // Unless the interpreter was explicitly selected or the JIT is not linked, // try making a JIT. @@ -467,13 +451,9 @@ ExecutionEngine *EngineBuilder::create(TargetMachine *TM) { } ExecutionEngine *EE = nullptr; - if (UseMCJIT && ExecutionEngine::MCJITCtor) + if (ExecutionEngine::MCJITCtor) EE = ExecutionEngine::MCJITCtor(std::move(M), ErrorStr, MCJMM ? MCJMM : JMM, TheTM.release()); - else if (ExecutionEngine::JITCtor) - EE = ExecutionEngine::JITCtor(std::move(M), ErrorStr, JMM, - AllocateGVsWithCode, TheTM.release()); - if (EE) { EE->setVerifyModules(VerifyModules); return EE; @@ -490,8 +470,7 @@ ExecutionEngine *EngineBuilder::create(TargetMachine *TM) { return nullptr; } - if ((WhichEngine & EngineKind::JIT) && !ExecutionEngine::JITCtor && - !ExecutionEngine::MCJITCtor) { + if ((WhichEngine & EngineKind::JIT) && !ExecutionEngine::MCJITCtor) { if (ErrorStr) *ErrorStr = "JIT has not been linked in."; } @@ -837,9 +816,6 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) { Result = PTOGV(getPointerToFunctionOrStub(const_cast<Function*>(F))); else if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(C)) Result = PTOGV(getOrEmitGlobalVariable(const_cast<GlobalVariable*>(GV))); - else if (const BlockAddress *BA = dyn_cast<BlockAddress>(C)) - Result = PTOGV(getPointerToBasicBlock(const_cast<BasicBlock*>( - BA->getBasicBlock()))); else llvm_unreachable("Unknown constant pointer type!"); break; |