diff options
author | Eric Christopher <echristo@gmail.com> | 2014-08-04 21:25:23 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2014-08-04 21:25:23 +0000 |
commit | d913448b38bab6ace92ae5057b917eb57035f83b (patch) | |
tree | f2050928fa5994c44fab60d66e7d89e7cc7d7a4f /llvm/lib/ExecutionEngine | |
parent | acc8ef273b1c3796b0fc7f19aa347115b4bc2ea4 (diff) | |
download | bcm5719-llvm-d913448b38bab6ace92ae5057b917eb57035f83b.tar.gz bcm5719-llvm-d913448b38bab6ace92ae5057b917eb57035f83b.zip |
Remove the TargetMachine forwards for TargetSubtargetInfo based
information and update all callers. No functional change.
llvm-svn: 214781
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JIT.cpp | 11 | ||||
-rw-r--r-- | llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp | 9 |
2 files changed, 11 insertions, 9 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/llvm/lib/ExecutionEngine/JIT/JIT.cpp index 83ec9784b98..ab0c1a680bd 100644 --- a/llvm/lib/ExecutionEngine/JIT/JIT.cpp +++ b/llvm/lib/ExecutionEngine/JIT/JIT.cpp @@ -34,6 +34,7 @@ #include "llvm/Support/MutexGuard.h" #include "llvm/Target/TargetJITInfo.h" #include "llvm/Target/TargetMachine.h" +#include "llvm/Target/TargetSubtargetInfo.h" using namespace llvm; @@ -82,7 +83,7 @@ ExecutionEngine *JIT::createJIT(Module *M, sys::DynamicLibrary::LoadLibraryPermanently(nullptr, nullptr); // If the target supports JIT code generation, create the JIT. - if (TargetJITInfo *TJ = TM->getJITInfo()) { + if (TargetJITInfo *TJ = TM->getSubtargetImpl()->getJITInfo()) { return new JIT(M, *TM, *TJ, JMM, GVsWithCode); } else { if (ErrorStr) @@ -139,7 +140,7 @@ JIT::JIT(Module *M, TargetMachine &tm, TargetJITInfo &tji, : ExecutionEngine(M), TM(tm), TJI(tji), JMM(jmm ? jmm : JITMemoryManager::CreateDefaultMemManager()), AllocateGVsWithCode(GVsWithCode), isAlreadyCodeGenerating(false) { - setDataLayout(TM.getDataLayout()); + setDataLayout(TM.getSubtargetImpl()->getDataLayout()); jitstate = new JITState(M); @@ -152,7 +153,7 @@ JIT::JIT(Module *M, TargetMachine &tm, TargetJITInfo &tji, // Add target data MutexGuard locked(lock); FunctionPassManager &PM = jitstate->getPM(); - M->setDataLayout(TM.getDataLayout()); + M->setDataLayout(TM.getSubtargetImpl()->getDataLayout()); PM.add(new DataLayoutPass(M)); // Turn the machine code intermediate representation into bytes in memory that @@ -185,7 +186,7 @@ void JIT::addModule(Module *M) { jitstate = new JITState(M); FunctionPassManager &PM = jitstate->getPM(); - M->setDataLayout(TM.getDataLayout()); + M->setDataLayout(TM.getSubtargetImpl()->getDataLayout()); PM.add(new DataLayoutPass(M)); // Turn the machine code intermediate representation into bytes in memory @@ -217,7 +218,7 @@ bool JIT::removeModule(Module *M) { jitstate = new JITState(Modules[0]); FunctionPassManager &PM = jitstate->getPM(); - M->setDataLayout(TM.getDataLayout()); + M->setDataLayout(TM.getSubtargetImpl()->getDataLayout()); PM.add(new DataLayoutPass(M)); // Turn the machine code intermediate representation into bytes in memory diff --git a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp index 435ffd7cdfa..53630d5a5e8 100644 --- a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp +++ b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp @@ -28,6 +28,7 @@ #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/MutexGuard.h" #include "llvm/Target/TargetLowering.h" +#include "llvm/Target/TargetSubtargetInfo.h" using namespace llvm; @@ -59,7 +60,7 @@ MCJIT::MCJIT(Module *m, TargetMachine *tm, RTDyldMemoryManager *MM) ObjCache(nullptr) { OwnedModules.addModule(m); - setDataLayout(TM->getDataLayout()); + setDataLayout(TM->getSubtargetImpl()->getDataLayout()); } MCJIT::~MCJIT() { @@ -133,7 +134,7 @@ ObjectBufferStream* MCJIT::emitObject(Module *M) { PassManager PM; - M->setDataLayout(TM->getDataLayout()); + M->setDataLayout(TM->getSubtargetImpl()->getDataLayout()); PM.add(new DataLayoutPass(M)); // The RuntimeDyld will take ownership of this shortly @@ -251,7 +252,7 @@ void *MCJIT::getPointerToBasicBlock(BasicBlock *BB) { } uint64_t MCJIT::getExistingSymbolAddress(const std::string &Name) { - Mangler Mang(TM->getDataLayout()); + Mangler Mang(TM->getSubtargetImpl()->getDataLayout()); SmallString<128> FullName; Mang.getNameWithPrefix(FullName, Name); return Dyld.getSymbolLoadAddress(FullName); @@ -365,7 +366,7 @@ void *MCJIT::getPointerToFunction(Function *F) { // // This is the accessor for the target address, so make sure to check the // load address of the symbol, not the local address. - Mangler Mang(TM->getDataLayout()); + Mangler Mang(TM->getSubtargetImpl()->getDataLayout()); SmallString<128> Name; TM->getNameWithPrefix(Name, F, Mang); return (void*)Dyld.getSymbolLoadAddress(Name); |