diff options
author | Reid Kleckner <reid@kleckner.net> | 2009-07-18 00:42:18 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2009-07-18 00:42:18 +0000 |
commit | fc8a2d5a8390952029e1c47a623e046b744f44d4 (patch) | |
tree | 628f6fa3e2de0310edd1fed1e72a666dc19bf884 /llvm/lib/ExecutionEngine/JIT/TargetSelect.cpp | |
parent | 91ff94d6d9befda562a1384f43ecde6e43b9db99 (diff) | |
download | bcm5719-llvm-fc8a2d5a8390952029e1c47a623e046b744f44d4.tar.gz bcm5719-llvm-fc8a2d5a8390952029e1c47a623e046b744f44d4.zip |
Add EngineBuilder to ExecutionEngine in favor of the five optional argument EE::create().
Also a test commit.
llvm-svn: 76276
Diffstat (limited to 'llvm/lib/ExecutionEngine/JIT/TargetSelect.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/JIT/TargetSelect.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/TargetSelect.cpp b/llvm/lib/ExecutionEngine/JIT/TargetSelect.cpp index 598b867a3f9..2b80e7e2bd1 100644 --- a/llvm/lib/ExecutionEngine/JIT/TargetSelect.cpp +++ b/llvm/lib/ExecutionEngine/JIT/TargetSelect.cpp @@ -38,13 +38,9 @@ MAttrs("mattr", cl::desc("Target specific attributes (-mattr=help for details)"), cl::value_desc("a1,+a2,-a3,...")); -/// createInternal - Create an return a new JIT compiler if there is one -/// available for the current target. Otherwise, return null. -/// -ExecutionEngine *JIT::createJIT(ModuleProvider *MP, std::string *ErrorStr, - JITMemoryManager *JMM, - CodeGenOpt::Level OptLevel, - bool AllocateGVsWithCode) { +/// selectTarget - Pick a target either via -march or by guessing the native +/// arch. Add any CPU features specified via -mcpu or -mattr. +TargetMachine *JIT::selectTarget(ModuleProvider *MP, std::string *ErrorStr) { const Target *TheTarget = 0; if (MArch.empty()) { std::string Error; @@ -90,12 +86,5 @@ ExecutionEngine *JIT::createJIT(ModuleProvider *MP, std::string *ErrorStr, TargetMachine *Target = TheTarget->createTargetMachine(*MP->getModule(), FeaturesStr); assert(Target && "Could not allocate target machine!"); - - // If the target supports JIT code generation, return a new JIT now. - if (TargetJITInfo *TJ = Target->getJITInfo()) - return new JIT(MP, *Target, *TJ, JMM, OptLevel, AllocateGVsWithCode); - - if (ErrorStr) - *ErrorStr = "target does not support JIT code generation"; - return 0; + return Target; } |