Skip to content

Commit

Permalink
Merge pull request #23350 from singam-sanjay/fix_for_LLVM6
Browse files Browse the repository at this point in the history
Fix for llvm6
  • Loading branch information
yuyichao authored Sep 27, 2017
2 parents eb51ff6 + 2c6e3b6 commit 6473693
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/disasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -661,8 +661,12 @@ static void jl_dump_asm_internal(

std::unique_ptr<MCObjectFileInfo> MOFI(new MCObjectFileInfo());
MCContext Ctx(MAI.get(), MRI.get(), MOFI.get(), &SrcMgr);
#if JL_LLVM_VERSION >= 60000
MOFI->InitMCObjectFileInfo(TheTriple, /* PIC */ false, Ctx);
#else
MOFI->InitMCObjectFileInfo(TheTriple, /* PIC */ false,
CodeModel::Default, Ctx);
#endif

// Set up Subtarget and Disassembler
std::unique_ptr<MCSubtargetInfo>
Expand Down
6 changes: 6 additions & 0 deletions src/jitlayers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,13 @@ void JuliaOJIT::addModule(std::unique_ptr<Module> M)
#endif
// Force LLVM to emit the module so that we can register the symbols
// in our lookup table.
#if JL_LLVM_VERSION >= 50000
auto Err = CompileLayer.emitAndFinalize(modset);
// Check for errors to prevent LLVM from crashing the program.
assert(!Err);
#else
CompileLayer.emitAndFinalize(modset);
#endif
}

void JuliaOJIT::removeModule(ModuleHandleT H)
Expand Down

2 comments on commit 6473693

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan

Please sign in to comment.