Skip to content

Commit

Permalink
Debug: put back the per-instruction barrier.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Dec 21, 2022
1 parent 707682e commit ab65997
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7806,6 +7806,13 @@ static jl_llvm_functions_t
ctx.builder.SetInsertPoint(tryblk);
}
else {
if (!jl_is_method(ctx.linfo->def.method) && !ctx.is_opaque_closure) {
// TODO: inference is invalid if this has any effect (which it often does)
LoadInst *world = ctx.builder.CreateAlignedLoad(getSizeTy(ctx.builder.getContext()),
prepare_global_in(jl_Module, jlgetworld_global), Align(sizeof(size_t)));
world->setOrdering(AtomicOrdering::Monotonic);
ctx.builder.CreateAlignedStore(world, world_age_field, Align(sizeof(size_t)));
}
emit_stmtpos(ctx, stmt, cursor);
mallocVisitStmt(debuginfoloc, nullptr);
}
Expand Down

0 comments on commit ab65997

Please sign in to comment.