Skip to content

Commit

Permalink
Add codegen patch as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Zentrik authored Sep 28, 2024
1 parent 2d8be99 commit a25a036
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions julia-patches/2f50b280dc8e995ef67ad31a5f71adc4c270890d
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
diff --git a/src/codegen.cpp b/src/codegen.cpp
index a452e0fccd..4ca549b474 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -2226,7 +2226,7 @@ static GlobalVariable *get_pointer_to_constant(jl_codegen_params_t &emission_con
static AllocaInst *emit_static_alloca(jl_codectx_t &ctx, Type *lty, Align align)
{
++EmittedAllocas;
- return new AllocaInst(lty, ctx.topalloca->getModule()->getDataLayout().getAllocaAddrSpace(), nullptr, align, "", /*InsertBefore=*/ctx.topalloca);
+ return new AllocaInst(lty, ctx.topalloca->getModule()->getDataLayout().getAllocaAddrSpace(), nullptr, align, "", /*InsertBefore=*/ctx.topalloca->getIterator());
}

static AllocaInst *emit_static_alloca(jl_codectx_t &ctx, unsigned nb, Align align)
@@ -9627,10 +9627,10 @@ static jl_llvm_functions_t
// TODO: inference is invalid if this has any effect (which it often does)
LoadInst *world = new LoadInst(ctx.types().T_size,
prepare_global_in(jl_Module, jlgetworld_global), Twine(),
- /*isVolatile*/false, ctx.types().alignof_ptr, /*insertBefore*/&I);
+ /*isVolatile*/false, ctx.types().alignof_ptr, /*insertBefore*/I.getIterator());
world->setOrdering(AtomicOrdering::Acquire);
StoreInst *store_world = new StoreInst(world, world_age_field,
- /*isVolatile*/false, ctx.types().alignof_ptr, /*insertBefore*/&I);
+ /*isVolatile*/false, ctx.types().alignof_ptr, /*insertBefore*/I.getIterator());
(void)store_world;
}
}
diff --git a/src/llvm-alloc-opt.cpp b/src/llvm-alloc-opt.cpp
index 188955fd50..4299f17a72 100644
--- a/src/llvm-alloc-opt.cpp
Expand Down

0 comments on commit a25a036

Please sign in to comment.