mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Nuke the old JIT.
I am sure we will be finding bits and pieces of dead code for years to come, but this is a good start. Thanks to Lang Hames for making MCJIT a good replacement! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215111 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -48,12 +48,6 @@ void ObjectCache::anchor() {}
|
||||
void ObjectBuffer::anchor() {}
|
||||
void ObjectBufferStream::anchor() {}
|
||||
|
||||
ExecutionEngine *(*ExecutionEngine::JITCtor)(
|
||||
Module *M,
|
||||
std::string *ErrorStr,
|
||||
JITMemoryManager *JMM,
|
||||
bool GVsWithCode,
|
||||
TargetMachine *TM) = nullptr;
|
||||
ExecutionEngine *(*ExecutionEngine::MCJITCtor)(
|
||||
Module *M,
|
||||
std::string *ErrorStr,
|
||||
@@ -417,10 +411,8 @@ void EngineBuilder::InitEngine() {
|
||||
MCJMM = nullptr;
|
||||
JMM = nullptr;
|
||||
Options = TargetOptions();
|
||||
AllocateGVsWithCode = false;
|
||||
RelocModel = Reloc::Default;
|
||||
CMModel = CodeModel::JITDefault;
|
||||
UseMCJIT = false;
|
||||
|
||||
// IR module verification is enabled by default in debug builds, and disabled
|
||||
// by default in release builds.
|
||||
@@ -453,14 +445,6 @@ ExecutionEngine *EngineBuilder::create(TargetMachine *TM) {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
if (MCJMM && ! UseMCJIT) {
|
||||
if (ErrorStr)
|
||||
*ErrorStr =
|
||||
"Cannot create a legacy JIT with a runtime dyld memory "
|
||||
"manager.";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Unless the interpreter was explicitly selected or the JIT is not linked,
|
||||
// try making a JIT.
|
||||
@@ -473,12 +457,9 @@ ExecutionEngine *EngineBuilder::create(TargetMachine *TM) {
|
||||
}
|
||||
|
||||
ExecutionEngine *EE = nullptr;
|
||||
if (UseMCJIT && ExecutionEngine::MCJITCtor)
|
||||
if (ExecutionEngine::MCJITCtor)
|
||||
EE = ExecutionEngine::MCJITCtor(M, ErrorStr, MCJMM ? MCJMM : JMM,
|
||||
TheTM.release());
|
||||
else if (ExecutionEngine::JITCtor)
|
||||
EE = ExecutionEngine::JITCtor(M, ErrorStr, JMM,
|
||||
AllocateGVsWithCode, TheTM.release());
|
||||
|
||||
if (EE) {
|
||||
EE->setVerifyModules(VerifyModules);
|
||||
@@ -496,8 +477,7 @@ ExecutionEngine *EngineBuilder::create(TargetMachine *TM) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if ((WhichEngine & EngineKind::JIT) && !ExecutionEngine::JITCtor &&
|
||||
!ExecutionEngine::MCJITCtor) {
|
||||
if ((WhichEngine & EngineKind::JIT) && !ExecutionEngine::MCJITCtor) {
|
||||
if (ErrorStr)
|
||||
*ErrorStr = "JIT has not been linked in.";
|
||||
}
|
||||
@@ -843,9 +823,6 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
|
||||
Result = PTOGV(getPointerToFunctionOrStub(const_cast<Function*>(F)));
|
||||
else if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(C))
|
||||
Result = PTOGV(getOrEmitGlobalVariable(const_cast<GlobalVariable*>(GV)));
|
||||
else if (const BlockAddress *BA = dyn_cast<BlockAddress>(C))
|
||||
Result = PTOGV(getPointerToBasicBlock(const_cast<BasicBlock*>(
|
||||
BA->getBasicBlock())));
|
||||
else
|
||||
llvm_unreachable("Unknown constant pointer type!");
|
||||
break;
|
||||
|
Reference in New Issue
Block a user