Skip to content

Commit 049de79

Browse files
authored
Name a couple more things in LLVM IR (#50625)
1 parent 958f647 commit 049de79

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

src/cgutils.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3317,6 +3317,9 @@ static Value *_boxed_special(jl_codectx_t &ctx, const jl_cgval_t &vinfo, Type *t
33173317
assert(jb->instance != NULL);
33183318
return track_pjlvalue(ctx, literal_pointer_val(ctx, jb->instance));
33193319
}
3320+
if (box) {
3321+
setName(ctx.emission_context, box, [&]() {return "box_" + std::string(jl_symbol_name(jb->name->name));});
3322+
}
33203323
return box;
33213324
}
33223325

src/codegen.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4607,6 +4607,7 @@ static jl_cgval_t emit_call(jl_codectx_t &ctx, jl_expr_t *ex, jl_value_t *rt, bo
46074607
auto it = builtin_func_map().find(jl_get_builtin_fptr(f.constant));
46084608
if (it != builtin_func_map().end()) {
46094609
Value *ret = emit_jlcall(ctx, it->second, Constant::getNullValue(ctx.types().T_prjlvalue), &argv[1], nargs - 1, julia_call);
4610+
setName(ctx.emission_context, ret, it->second->name + "_ret");
46104611
return mark_julia_type(ctx, ret, true, rt);
46114612
}
46124613
}

src/llvm-late-gc-lowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2226,7 +2226,7 @@ Value *LateLowerGCFrame::EmitLoadTag(IRBuilder<> &builder, Type *T_size, Value *
22262226
{
22272227
auto addr = EmitTagPtr(builder, T_size, T_size, V);
22282228
auto &M = *builder.GetInsertBlock()->getModule();
2229-
LoadInst *load = builder.CreateAlignedLoad(T_size, addr, M.getDataLayout().getPointerABIAlignment(0), V->getName() + "tag");
2229+
LoadInst *load = builder.CreateAlignedLoad(T_size, addr, M.getDataLayout().getPointerABIAlignment(0), V->getName() + ".tag");
22302230
load->setOrdering(AtomicOrdering::Unordered);
22312231
load->setMetadata(LLVMContext::MD_tbaa, tbaa_tag);
22322232
MDBuilder MDB(load->getContext());
@@ -2297,7 +2297,7 @@ bool LateLowerGCFrame::CleanupIR(Function &F, State *S, bool *CFGModified) {
22972297
if (T_prjlvalue) {
22982298
T_pprjlvalue = T_prjlvalue->getPointerTo();
22992299
Frame = new AllocaInst(T_prjlvalue, allocaAddressSpace,
2300-
ConstantInt::get(T_int32, maxframeargs), "", StartOff);
2300+
ConstantInt::get(T_int32, maxframeargs), "jlcallframe", StartOff);
23012301
}
23022302
std::vector<CallInst*> write_barriers;
23032303
for (BasicBlock &BB : F) {

0 commit comments

Comments
 (0)