@@ -58,7 +58,7 @@ impl<'ll> OffloadGlobals<'ll> {
5858 }
5959}
6060
61- pub fn generate_mapper_call < ' ll , ' tcx > (
61+ pub ( crate ) fn generate_mapper_call < ' ll , ' tcx > (
6262 builder : & mut Builder < ' _ , ' ll , ' tcx > ,
6363 geps : [ & ' ll Value ; 3 ] ,
6464 o_type : & ' ll Value ,
@@ -586,7 +586,7 @@ fn get_runtime_size<'ll, 'tcx>(
586586
587587// For now we have a very simplistic indexing scheme into our
588588// offload_{baseptrs,ptrs,sizes}. We will probably improve this along with our gpu frontend pr.
589- pub fn get_geps < ' ll , ' tcx > (
589+ pub ( crate ) fn get_geps < ' ll , ' tcx > (
590590 builder : & mut Builder < ' _ , ' ll , ' tcx > ,
591591 ty : & ' ll Type ,
592592 ty2 : & ' ll Type ,
@@ -604,7 +604,7 @@ pub fn get_geps<'ll, 'tcx>(
604604 [ gep1, gep2, gep3]
605605}
606606
607- pub fn preper_datatransfers < ' ll , ' tcx > (
607+ pub ( crate ) fn preper_datatransfers < ' ll , ' tcx > (
608608 cx : & SimpleCx < ' ll > ,
609609 builder : & mut Builder < ' _ , ' ll , ' tcx > ,
610610 args : & [ & ' ll Value ] ,
@@ -792,6 +792,7 @@ pub(crate) fn gen_call_handling<'ll, 'tcx>(
792792
793793 // Step 3)
794794 // Here we fill the KernelArgsTy, see the documentation above
795+ let i32_0 = cx. get_const_i32 ( 0 ) ;
795796 for ( i, value) in values. iter ( ) . enumerate ( ) {
796797 let ptr = builder. inbounds_gep ( tgt_kernel_decl, a5, & [ i32_0, cx. get_const_i32 ( i as u64 ) ] ) ;
797798 let name = std:: ffi:: CString :: new ( value. 1 ) . unwrap ( ) ;
0 commit comments