Skip to content

Commit

Permalink
Merge pull request #19070 from JuliaLang/yyc/tests/llvm
Browse files Browse the repository at this point in the history
Fix compilation on LLVM 4.0
  • Loading branch information
yuyichao committed Oct 24, 2016
2 parents b3d7ee1 + 1b35490 commit f56d594
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/cgutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,14 @@ static DIType julia_type_to_di(jl_value_t *jt, DIBuilder *dbuilder, bool isboxed
}
if (jl_is_bitstype(jt)) {
uint64_t SizeInBits = jl_datatype_nbits(jdt);
#if JL_LLVM_VERSION >= 30700
#if JL_LLVM_VERSION >= 40000
llvm::DIType *t = dbuilder->createBasicType(
jl_symbol_name(jdt->name->name),
SizeInBits,
llvm::dwarf::DW_ATE_unsigned);
jdt->ditype = t;
return t;
#elif JL_LLVM_VERSION >= 30700
llvm::DIType *t = dbuilder->createBasicType(
jl_symbol_name(jdt->name->name),
SizeInBits,
Expand Down
1 change: 1 addition & 0 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4429,6 +4429,7 @@ static std::unique_ptr<Module> emit_function(jl_method_instance_t *lam, jl_code_
jl_varinfo_t &varinfo = ctx.slots[i];
if (varinfo.isArgument || s == compiler_temp_sym || s == unused_sym)
continue;
// LLVM 4.0: Assume the variable has default alignment
#if JL_LLVM_VERSION >= 30800
varinfo.dinfo = dbuilder.createAutoVariable(
#else
Expand Down

3 comments on commit f56d594

@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 @jrevels

@yuyichao
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The sparse index regressions might be real?

Please sign in to comment.