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 | a194c3a69e5430acd95635f37610f9fdf75b5db3 (patch) | |
| tree | 8f7163094a380ee629e890ec77eae38e631e1303 /llvm/lib/ExecutionEngine/JIT/JIT.cpp | |
| parent | 28486d420b77902202c21443d85fd8e82daa0ce2 (diff) | |
| download | bcm5719-llvm-a194c3a69e5430acd95635f37610f9fdf75b5db3.tar.gz bcm5719-llvm-a194c3a69e5430acd95635f37610f9fdf75b5db3.zip | |
First patch in the direction of splitting MachineCodeEmitter in two subclasses:
JITCodeEmitter and ObjectCodeEmitter. No functional changes yet. Patch by Aaron Gray
llvm-svn: 72631
Diffstat (limited to 'llvm/lib/ExecutionEngine/JIT/JIT.cpp')
| -rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JIT.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/llvm/lib/ExecutionEngine/JIT/JIT.cpp index 522a08dd783..f8ae8844616 100644 --- a/llvm/lib/ExecutionEngine/JIT/JIT.cpp +++ b/llvm/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); |

