diff options
author | Dylan Noblesmith <nobled@dreamwidth.org> | 2011-05-13 21:51:29 +0000 |
---|---|---|
committer | Dylan Noblesmith <nobled@dreamwidth.org> | 2011-05-13 21:51:29 +0000 |
commit | 8418fdcd5914db7a33e0f44ebd6b3eb1dc09e945 (patch) | |
tree | 1501b119c1bd4064181b8e204f099338a16f44bc /llvm/lib/ExecutionEngine/MCJIT | |
parent | 1756faa4723f248e95695d288d0eeff203f53bfd (diff) | |
download | bcm5719-llvm-8418fdcd5914db7a33e0f44ebd6b3eb1dc09e945.tar.gz bcm5719-llvm-8418fdcd5914db7a33e0f44ebd6b3eb1dc09e945.zip |
ExecutionEngine: push TargetMachine creation into clients (v2)
In particular, into EngineBuilder. This should only impact
the private API between the EE and EB classes, not external
clients, since JITCtor and MCJITCtor are both protected members.
llvm-svn: 131317
Diffstat (limited to 'llvm/lib/ExecutionEngine/MCJIT')
-rw-r--r-- | llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp | 15 | ||||
-rw-r--r-- | llvm/lib/ExecutionEngine/MCJIT/MCJIT.h | 5 |
2 files changed, 2 insertions, 18 deletions
diff --git a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp index ea493e29149..8adebf3932f 100644 --- a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp +++ b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp @@ -38,25 +38,12 @@ ExecutionEngine *MCJIT::createJIT(Module *M, JITMemoryManager *JMM, CodeGenOpt::Level OptLevel, bool GVsWithCode, - CodeModel::Model CMM, - StringRef MArch, - StringRef MCPU, - const SmallVectorImpl<std::string>& MAttrs) { + TargetMachine *TM) { // Try to register the program as a source of symbols to resolve against. // // FIXME: Don't do this here. sys::DynamicLibrary::LoadLibraryPermanently(0, NULL); - // Pick a target either via -march or by guessing the native arch. - // - // FIXME: This should be lifted out of here, it isn't something which should - // be part of the JIT policy, rather the burden for this selection should be - // pushed to clients. - TargetMachine *TM = - EngineBuilder::selectTarget(M, MArch, MCPU, MAttrs, ErrorStr); - if (!TM || (ErrorStr && ErrorStr->length() > 0)) return 0; - TM->setCodeModel(CMM); - // If the target supports JIT code generation, create the JIT. if (TargetJITInfo *TJ = TM->getJITInfo()) return new MCJIT(M, TM, *TJ, new MCJITMemoryManager(JMM, M), OptLevel, diff --git a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h index d77b36c29cf..b64c21a9736 100644 --- a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h +++ b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h @@ -81,10 +81,7 @@ public: JITMemoryManager *JMM, CodeGenOpt::Level OptLevel, bool GVsWithCode, - CodeModel::Model CMM, - StringRef MArch, - StringRef MCPU, - const SmallVectorImpl<std::string>& MAttrs); + TargetMachine *TM); // @} }; |