mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
ExecutionEngine: honor optimization level
It was getting ignored after r144788. Also fix an accidental implicit cast from the OptLevel enum to an optional bool argument. MSVC warned on this, but gcc didn't. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145633 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -420,7 +420,7 @@ ExecutionEngine *ExecutionEngine::create(Module *M,
|
||||
ExecutionEngine *ExecutionEngine::createJIT(Module *M,
|
||||
std::string *ErrorStr,
|
||||
JITMemoryManager *JMM,
|
||||
CodeGenOpt::Level OptLevel,
|
||||
CodeGenOpt::Level OL,
|
||||
bool GVsWithCode,
|
||||
Reloc::Model RM,
|
||||
CodeModel::Model CMM) {
|
||||
@ -437,10 +437,10 @@ ExecutionEngine *ExecutionEngine::createJIT(Module *M,
|
||||
SmallVector<std::string, 1> MAttrs;
|
||||
|
||||
TargetMachine *TM =
|
||||
EngineBuilder::selectTarget(M, MArch, MCPU, MAttrs, RM, CMM, ErrorStr);
|
||||
EngineBuilder::selectTarget(M, MArch, MCPU, MAttrs, RM, CMM, OL, ErrorStr);
|
||||
if (!TM || (ErrorStr && ErrorStr->length() > 0)) return 0;
|
||||
|
||||
return ExecutionEngine::JITCtor(M, ErrorStr, JMM, OptLevel, GVsWithCode, TM);
|
||||
return ExecutionEngine::JITCtor(M, ErrorStr, JMM, OL, GVsWithCode, TM);
|
||||
}
|
||||
|
||||
ExecutionEngine *EngineBuilder::create() {
|
||||
@ -467,7 +467,7 @@ ExecutionEngine *EngineBuilder::create() {
|
||||
if (WhichEngine & EngineKind::JIT) {
|
||||
if (TargetMachine *TM = EngineBuilder::selectTarget(M, MArch, MCPU, MAttrs,
|
||||
RelocModel, CMModel,
|
||||
ErrorStr)) {
|
||||
OptLevel, ErrorStr)) {
|
||||
if (UseMCJIT && ExecutionEngine::MCJITCtor) {
|
||||
ExecutionEngine *EE =
|
||||
ExecutionEngine::MCJITCtor(M, ErrorStr, JMM, OptLevel,
|
||||
|
Reference in New Issue
Block a user