summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/JIT/TargetSelect.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-06 01:34:04 +0000
committerChris Lattner <sabre@nondot.org>2007-12-06 01:34:04 +0000
commit7f3587e344f051718c04c748a36b14c2add6f3c3 (patch)
treed953b612296ad0d1038cd5abd2ec635975ea1ecd /llvm/lib/ExecutionEngine/JIT/TargetSelect.cpp
parentdc351b94f9f277e872e04e1b475f102a850f6e93 (diff)
downloadbcm5719-llvm-7f3587e344f051718c04c748a36b14c2add6f3c3.tar.gz
bcm5719-llvm-7f3587e344f051718c04c748a36b14c2add6f3c3.zip
add a new ExecutionEngine::createJIT which can be used if you only want
to create a JIT. This lets you specify JIT-specific configuration items like the JITMemoryManager to use. llvm-svn: 44647
Diffstat (limited to 'llvm/lib/ExecutionEngine/JIT/TargetSelect.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/JIT/TargetSelect.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/TargetSelect.cpp b/llvm/lib/ExecutionEngine/JIT/TargetSelect.cpp
index 14e0a5f10e7..e6598504a26 100644
--- a/llvm/lib/ExecutionEngine/JIT/TargetSelect.cpp
+++ b/llvm/lib/ExecutionEngine/JIT/TargetSelect.cpp
@@ -36,10 +36,11 @@ MAttrs("mattr",
cl::desc("Target specific attributes (-mattr=help for details)"),
cl::value_desc("a1,+a2,-a3,..."));
-/// create - Create an return a new JIT compiler if there is one available
-/// for the current target. Otherwise, return null.
+/// createInternal - Create an return a new JIT compiler if there is one
+/// available for the current target. Otherwise, return null.
///
-ExecutionEngine *JIT::create(ModuleProvider *MP, std::string *ErrorStr) {
+ExecutionEngine *JIT::createJIT(ModuleProvider *MP, std::string *ErrorStr,
+ JITMemoryManager *JMM) {
const TargetMachineRegistry::entry *TheArch = MArch;
if (TheArch == 0) {
std::string Error;
@@ -71,7 +72,7 @@ ExecutionEngine *JIT::create(ModuleProvider *MP, std::string *ErrorStr) {
// If the target supports JIT code generation, return a new JIT now.
if (TargetJITInfo *TJ = Target->getJITInfo())
- return new JIT(MP, *Target, *TJ);
+ return new JIT(MP, *Target, *TJ, JMM);
if (ErrorStr)
*ErrorStr = "target does not support JIT code generation";
OpenPOWER on IntegriCloud