diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-11-17 16:06:37 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-11-17 16:06:37 +0000 |
commit | 70ff8b05e35520bb1b86a155b79922b36a8e5d73 (patch) | |
tree | 38fcb78a657fcfbeff440e499ba6139505075f50 /llvm/lib | |
parent | 9b6fae5d6d42b6268526f184432154cc6ab93fdb (diff) | |
download | bcm5719-llvm-70ff8b05e35520bb1b86a155b79922b36a8e5d73.tar.gz bcm5719-llvm-70ff8b05e35520bb1b86a155b79922b36a8e5d73.zip |
lli: Add stub -use-mcjit option, which doesn't currently do anything.
llvm-svn: 119508
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/ExecutionEngine/ExecutionEngine.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp index fc5cb926e3b..91d68fb1e25 100644 --- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp @@ -46,6 +46,16 @@ ExecutionEngine *(*ExecutionEngine::JITCtor)( StringRef MArch, StringRef MCPU, const SmallVectorImpl<std::string>& MAttrs) = 0; +ExecutionEngine *(*ExecutionEngine::MCJITCtor)( + Module *M, + std::string *ErrorStr, + JITMemoryManager *JMM, + CodeGenOpt::Level OptLevel, + bool GVsWithCode, + CodeModel::Model CMM, + StringRef MArch, + StringRef MCPU, + const SmallVectorImpl<std::string>& MAttrs) = 0; ExecutionEngine *(*ExecutionEngine::InterpCtor)(Module *M, std::string *ErrorStr) = 0; @@ -430,7 +440,13 @@ ExecutionEngine *EngineBuilder::create() { // Unless the interpreter was explicitly selected or the JIT is not linked, // try making a JIT. if (WhichEngine & EngineKind::JIT) { - if (ExecutionEngine::JITCtor) { + if (UseMCJIT && ExecutionEngine::MCJITCtor) { + ExecutionEngine *EE = + ExecutionEngine::MCJITCtor(M, ErrorStr, JMM, OptLevel, + AllocateGVsWithCode, CMModel, + MArch, MCPU, MAttrs); + if (EE) return EE; + } else if (ExecutionEngine::JITCtor) { ExecutionEngine *EE = ExecutionEngine::JITCtor(M, ErrorStr, JMM, OptLevel, AllocateGVsWithCode, CMModel, |