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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44647 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2007-12-06 01:34:04 +00:00
parent 9f2f142d25
commit 34c9433004
4 changed files with 41 additions and 8 deletions
+5 -4
View File
@@ -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";