diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-08-07 14:21:18 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-08-07 14:21:18 +0000 |
commit | f8b27c41e84cefba4be361b96cc0bd545e1dc64d (patch) | |
tree | 30da06ab749221027f133c39c8d85ade1bdc2807 /llvm/tools/lli/lli.cpp | |
parent | 84d35dfe962dcac4833381e5bd52eddcbcb91662 (diff) | |
download | bcm5719-llvm-f8b27c41e84cefba4be361b96cc0bd545e1dc64d.tar.gz bcm5719-llvm-f8b27c41e84cefba4be361b96cc0bd545e1dc64d.zip |
Nuke the old JIT.
I am sure we will be finding bits and pieces of dead code for years to
come, but this is a good start.
Thanks to Lang Hames for making MCJIT a good replacement!
llvm-svn: 215111
Diffstat (limited to 'llvm/tools/lli/lli.cpp')
-rw-r--r-- | llvm/tools/lli/lli.cpp | 42 |
1 files changed, 8 insertions, 34 deletions
diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp index fda55e4b575..13472214dfb 100644 --- a/llvm/tools/lli/lli.cpp +++ b/llvm/tools/lli/lli.cpp @@ -22,7 +22,6 @@ #include "llvm/CodeGen/LinkAllCodegenComponents.h" #include "llvm/ExecutionEngine/GenericValue.h" #include "llvm/ExecutionEngine/Interpreter.h" -#include "llvm/ExecutionEngine/JIT.h" #include "llvm/ExecutionEngine/JITEventListener.h" #include "llvm/ExecutionEngine/JITMemoryManager.h" #include "llvm/ExecutionEngine/MCJIT.h" @@ -76,10 +75,6 @@ namespace { cl::desc("Force interpretation: disable JIT"), cl::init(false)); - cl::opt<bool> UseMCJIT( - "use-mcjit", cl::desc("Enable use of the MC-based JIT (if available)"), - cl::init(false)); - cl::opt<bool> DebugIR( "debug-ir", cl::desc("Generate debug information to allow debugging IR."), cl::init(false)); @@ -405,12 +400,9 @@ int main(int argc, char **argv, char * const *envp) { } if (EnableCacheManager) { - if (UseMCJIT) { - std::string CacheName("file:"); - CacheName.append(InputFile); - Mod->setModuleIdentifier(CacheName); - } else - errs() << "warning: -enable-cache-manager can only be used with MCJIT."; + std::string CacheName("file:"); + CacheName.append(InputFile); + Mod->setModuleIdentifier(CacheName); } // If not jitting lazily, load the whole bitcode file eagerly too. @@ -423,12 +415,6 @@ int main(int argc, char **argv, char * const *envp) { } if (DebugIR) { - if (!UseMCJIT) { - errs() << "warning: -debug-ir used without -use-mcjit. Only partial debug" - << " information will be emitted by the non-MC JIT engine. To see full" - << " source debug information, enable the flag '-use-mcjit'.\n"; - - } ModulePass *DebugIRPass = createDebugIRPass(); DebugIRPass->runOnModule(*Mod); } @@ -451,8 +437,7 @@ int main(int argc, char **argv, char * const *envp) { // Enable MCJIT if desired. RTDyldMemoryManager *RTDyldMM = nullptr; - if (UseMCJIT && !ForceInterpreter) { - builder.setUseMCJIT(true); + if (!ForceInterpreter) { if (RemoteMCJIT) RTDyldMM = new RemoteMemoryManager(); else @@ -517,12 +502,9 @@ int main(int argc, char **argv, char * const *envp) { return 1; } if (EnableCacheManager) { - if (UseMCJIT) { - std::string CacheName("file:"); - CacheName.append(ExtraModules[i]); - XMod->setModuleIdentifier(CacheName); - } - // else, we already printed a warning above. + std::string CacheName("file:"); + CacheName.append(ExtraModules[i]); + XMod->setModuleIdentifier(CacheName); } EE->addModule(XMod); } @@ -611,20 +593,12 @@ int main(int argc, char **argv, char * const *envp) { NULL); // Run static constructors. - if (UseMCJIT && !ForceInterpreter) { + if (!ForceInterpreter) { // Give MCJIT a chance to apply relocations and set page permissions. EE->finalizeObject(); } EE->runStaticConstructorsDestructors(false); - if (!UseMCJIT && NoLazyCompilation) { - for (Module::iterator I = Mod->begin(), E = Mod->end(); I != E; ++I) { - Function *Fn = &*I; - if (Fn != EntryFn && !Fn->isDeclaration()) - EE->getPointerToFunction(Fn); - } - } - // Trigger compilation separately so code regions that need to be // invalidated will be known. (void)EE->getPointerToFunction(EntryFn); |