diff options
Diffstat (limited to 'llvm/lib/ExecutionEngine/JIT')
-rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JIT.cpp | 11 |
1 files changed, 6 insertions, 5 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 |