diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2009-05-30 20:51:52 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2009-05-30 20:51:52 +0000 |
commit | a3f99f90338d89354384ca25f53ca4450a1a9d18 (patch) | |
tree | 1e3eb946af54ca0dd5e57486978e10f11d2a4210 /lib/ExecutionEngine/JIT/JIT.cpp | |
parent | 0e98e4d299e76ab627d53c976f0f84b449106d15 (diff) |
First patch in the direction of splitting MachineCodeEmitter in two subclasses:
JITCodeEmitter and ObjectCodeEmitter. No functional changes yet. Patch by Aaron Gray
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72631 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/JIT/JIT.cpp')
-rw-r--r-- | lib/ExecutionEngine/JIT/JIT.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp index 522a08dd78..f8ae884461 100644 --- a/lib/ExecutionEngine/JIT/JIT.cpp +++ b/lib/ExecutionEngine/JIT/JIT.cpp @@ -19,7 +19,7 @@ #include "llvm/GlobalVariable.h" #include "llvm/Instructions.h" #include "llvm/ModuleProvider.h" -#include "llvm/CodeGen/MachineCodeEmitter.h" +#include "llvm/CodeGen/JITCodeEmitter.h" #include "llvm/ExecutionEngine/GenericValue.h" #include "llvm/CodeGen/MachineCodeInfo.h" #include "llvm/Target/TargetData.h" @@ -214,8 +214,8 @@ JIT::JIT(ModuleProvider *MP, TargetMachine &tm, TargetJITInfo &tji, jitstate = new JITState(MP); - // Initialize MCE - MCE = createEmitter(*this, JMM); + // Initialize JCE + JCE = createEmitter(*this, JMM); // Add target data MutexGuard locked(lock); @@ -224,7 +224,7 @@ JIT::JIT(ModuleProvider *MP, TargetMachine &tm, TargetJITInfo &tji, // Turn the machine code intermediate representation into bytes in memory that // may be executed. - if (TM.addPassesToEmitMachineCode(PM, *MCE, OptLevel)) { + if (TM.addPassesToEmitMachineCode(PM, *JCE, OptLevel)) { cerr << "Target does not support machine code emission!\n"; abort(); } @@ -253,7 +253,7 @@ JIT::JIT(ModuleProvider *MP, TargetMachine &tm, TargetJITInfo &tji, JIT::~JIT() { delete jitstate; - delete MCE; + delete JCE; delete &TM; } @@ -273,7 +273,7 @@ void JIT::addModuleProvider(ModuleProvider *MP) { // Turn the machine code intermediate representation into bytes in memory // that may be executed. - if (TM.addPassesToEmitMachineCode(PM, *MCE, CodeGenOpt::Default)) { + if (TM.addPassesToEmitMachineCode(PM, *JCE, CodeGenOpt::Default)) { cerr << "Target does not support machine code emission!\n"; abort(); } @@ -306,7 +306,7 @@ Module *JIT::removeModuleProvider(ModuleProvider *MP, std::string *E) { // Turn the machine code intermediate representation into bytes in memory // that may be executed. - if (TM.addPassesToEmitMachineCode(PM, *MCE, CodeGenOpt::Default)) { + if (TM.addPassesToEmitMachineCode(PM, *JCE, CodeGenOpt::Default)) { cerr << "Target does not support machine code emission!\n"; abort(); } @@ -338,7 +338,7 @@ void JIT::deleteModuleProvider(ModuleProvider *MP, std::string *E) { // Turn the machine code intermediate representation into bytes in memory // that may be executed. - if (TM.addPassesToEmitMachineCode(PM, *MCE, CodeGenOpt::Default)) { + if (TM.addPassesToEmitMachineCode(PM, *JCE, CodeGenOpt::Default)) { cerr << "Target does not support machine code emission!\n"; abort(); } @@ -654,7 +654,7 @@ void *JIT::getOrEmitGlobalVariable(const GlobalVariable *GV) { Ptr = (char*)Ptr + (MisAligned ? (A-MisAligned) : 0); } } else { - Ptr = MCE->allocateSpace(S, A); + Ptr = JCE->allocateSpace(S, A); } addGlobalMapping(GV, Ptr); EmitGlobalVariable(GV); |