mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
- Move CodeModel from a TargetMachine global option to MCCodeGenInfo.
- Introduce JITDefault code model. This tells targets to set different default code model for JIT. This eliminates the ugly hack in TargetMachine where code model is changed after construction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135580 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -437,9 +437,8 @@ ExecutionEngine *ExecutionEngine::createJIT(Module *M,
|
||||
SmallVector<std::string, 1> MAttrs;
|
||||
|
||||
TargetMachine *TM =
|
||||
EngineBuilder::selectTarget(M, MArch, MCPU, MAttrs, RM, ErrorStr);
|
||||
EngineBuilder::selectTarget(M, MArch, MCPU, MAttrs, RM, CMM, ErrorStr);
|
||||
if (!TM || (ErrorStr && ErrorStr->length() > 0)) return 0;
|
||||
TM->setCodeModel(CMM);
|
||||
|
||||
return ExecutionEngine::JITCtor(M, ErrorStr, JMM, OptLevel, GVsWithCode, TM);
|
||||
}
|
||||
@@ -467,9 +466,8 @@ ExecutionEngine *EngineBuilder::create() {
|
||||
// try making a JIT.
|
||||
if (WhichEngine & EngineKind::JIT) {
|
||||
if (TargetMachine *TM = EngineBuilder::selectTarget(M, MArch, MCPU, MAttrs,
|
||||
RelocModel, ErrorStr)) {
|
||||
TM->setCodeModel(CMModel);
|
||||
|
||||
RelocModel, CMModel,
|
||||
ErrorStr)) {
|
||||
if (UseMCJIT && ExecutionEngine::MCJITCtor) {
|
||||
ExecutionEngine *EE =
|
||||
ExecutionEngine::MCJITCtor(M, ErrorStr, JMM, OptLevel,
|
||||
|
||||
Reference in New Issue
Block a user