WIP - [artiq] only change slot
This commit is contained in:
parent
6afcd37b83
commit
5d242bad02
|
@ -680,7 +680,14 @@ fn format_rpc_ret<'ctx>(
|
||||||
// }
|
// }
|
||||||
|
|
||||||
_ => {
|
_ => {
|
||||||
|
let llvm_usize = generator.get_size_type(ctx.ctx);
|
||||||
|
|
||||||
let slot = ctx.builder.build_alloca(llvm_ret_ty, "rpc.ret.slot").unwrap();
|
let slot = ctx.builder.build_alloca(llvm_ret_ty, "rpc.ret.slot").unwrap();
|
||||||
|
let slot = if matches!(&*ctx.unifier.get_ty_immutable(ret_ty), TypeEnum::TObj { obj_id, .. } if *obj_id == PrimDef::NDArray.id()) {
|
||||||
|
ctx.builder.build_array_alloca(llvm_i8, llvm_usize.const_int(8, false), "").unwrap()
|
||||||
|
} else {
|
||||||
|
slot
|
||||||
|
};
|
||||||
let slotgen = ctx.builder.build_bitcast(slot, llvm_pi8, "rpc.ret.ptr").unwrap();
|
let slotgen = ctx.builder.build_bitcast(slot, llvm_pi8, "rpc.ret.ptr").unwrap();
|
||||||
ctx.builder.build_unconditional_branch(head_bb).unwrap();
|
ctx.builder.build_unconditional_branch(head_bb).unwrap();
|
||||||
ctx.builder.position_at_end(head_bb);
|
ctx.builder.position_at_end(head_bb);
|
||||||
|
|
Loading…
Reference in New Issue