Skip to content

Commit

Permalink
sink ptls
Browse files Browse the repository at this point in the history
  • Loading branch information
oscardssmith committed Oct 14, 2024
1 parent 9235f3b commit 003613b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cgutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4528,7 +4528,6 @@ static jl_cgval_t emit_const_len_memorynew(jl_codectx_t &ctx, jl_datatype_t *typ
emit_error(ctx, prepare_call(jlargumenterror_func), "invalid GenericMemory size: too large for system address width");

auto ct = get_current_task(ctx);
auto ptls = get_current_ptls(ctx);
auto T_size = ctx.types().T_size;
auto int8t = getInt8Ty(ctx.builder.getContext());
auto cg_typ = literal_pointer_val(ctx, (jl_value_t*) typ);
Expand Down Expand Up @@ -4561,6 +4560,7 @@ static jl_cgval_t emit_const_len_memorynew(jl_codectx_t &ctx, jl_datatype_t *typ
Value *data = emit_ptrgep(ctx, emit_pointer_from_objref(ctx, alloc), JL_SMALL_BYTE_ALIGNMENT);
ctx.builder.CreateStore(data, ptr_field);
} else { // just use the dynamic length version since the malloc will be slow anyway
auto ptls = get_current_ptls(ctx);
auto call = prepare_call(jl_alloc_genericmemory_unchecked_func);
alloc = ctx.builder.CreateCall(call, { ptls, cg_nbytes, cg_typ});
decay_alloc = maybe_decay_tracked(ctx, alloc);
Expand Down

0 comments on commit 003613b

Please sign in to comment.