diff options
| author | Chris Lattner <sabre@nondot.org> | 2003-12-20 01:22:19 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2003-12-20 01:22:19 +0000 |
| commit | 833c3c2597033fbd3b0e703a48244f934764066b (patch) | |
| tree | 4cb3b8ee64378733fdfe99881516f1e844b26336 /llvm/lib/ExecutionEngine/JIT/JIT.cpp | |
| parent | 80a4508614aae5af88be0c6eea14c2b013e0d0cd (diff) | |
| download | bcm5719-llvm-833c3c2597033fbd3b0e703a48244f934764066b.tar.gz bcm5719-llvm-833c3c2597033fbd3b0e703a48244f934764066b.zip | |
Rip JIT specific stuff out of TargetMachine, as per PR176
llvm-svn: 10542
Diffstat (limited to 'llvm/lib/ExecutionEngine/JIT/JIT.cpp')
| -rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JIT.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/llvm/lib/ExecutionEngine/JIT/JIT.cpp index c5a70eade58..dc9f7a14ffe 100644 --- a/llvm/lib/ExecutionEngine/JIT/JIT.cpp +++ b/llvm/lib/ExecutionEngine/JIT/JIT.cpp @@ -80,19 +80,20 @@ ExecutionEngine *VM::create(ModuleProvider *MP) { // Allocate a target... TargetMachine *Target = TargetMachineAllocator(*MP->getModule()); assert(Target && "Could not allocate target machine!"); - - // Create the virtual machine object... - return new VM(MP, Target); + + // If the target supports JIT code generation, return a new JIT now. + if (TargetJITInfo *TJ = Target->getJITInfo()) + return new VM(MP, *Target, *TJ); + return 0; } -VM::VM(ModuleProvider *MP, TargetMachine *tm) : ExecutionEngine(MP), TM(*tm), - PM(MP) -{ +VM::VM(ModuleProvider *MP, TargetMachine &tm, TargetJITInfo &tji) + : ExecutionEngine(MP), TM(tm), TJI(tji), PM(MP) { setTargetData(TM.getTargetData()); // Initialize MCE MCE = createEmitter(*this); - + setupPassManager(); emitGlobals(); |

