Skip to content

Commit

Permalink
codegen: mark argument array with tbaa_const (#45636)
Browse files Browse the repository at this point in the history
At some point our codegen roots became terrible, this fixes it.
  • Loading branch information
vtjnash authored Jun 16, 2022
1 parent b981452 commit 09e7a05
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6362,10 +6362,10 @@ static Function *gen_invoke_wrapper(jl_method_instance_t *lam, jl_value_t *jlret
}
else {
Value *argPtr = ctx.builder.CreateConstInBoundsGEP1_32(ctx.types().T_prjlvalue, argArray, i - 1);
theArg = maybe_mark_load_dereferenceable(
theArg = tbaa_decorate(ctx.tbaa().tbaa_const, maybe_mark_load_dereferenceable(
ctx.builder.CreateAlignedLoad(ctx.types().T_prjlvalue, argPtr, Align(sizeof(void*))),
false,
ty);
ty));
}
if (!isboxed) {
theArg = decay_derived(ctx, emit_bitcast(ctx, theArg, PointerType::get(lty, 0)));
Expand Down Expand Up @@ -7157,10 +7157,10 @@ static jl_llvm_functions_t
argType : vi.value.typ);
}
else {
Value *argPtr = ctx.builder.CreateInBoundsGEP(ctx.types().T_prjlvalue, argArray, ConstantInt::get(getSizeTy(ctx.builder.getContext()), i-1));
Value *load = maybe_mark_load_dereferenceable(
Value *argPtr = ctx.builder.CreateConstInBoundsGEP1_32(ctx.types().T_prjlvalue, argArray, i - 1);
Value *load = tbaa_decorate(ctx.tbaa().tbaa_const, maybe_mark_load_dereferenceable(
ctx.builder.CreateAlignedLoad(ctx.types().T_prjlvalue, argPtr, Align(sizeof(void*))),
false, vi.value.typ);
false, vi.value.typ));
theArg = mark_julia_type(ctx, load, true, vi.value.typ);
if (ctx.debug_enabled && vi.dinfo && !vi.boxroot && !vi.value.V) {
SmallVector<uint64_t, 8> addr;
Expand Down

0 comments on commit 09e7a05

Please sign in to comment.