@@ -505,19 +505,24 @@ ll_make_ftn_outlined_params(int func_sptr, int paramct, DTYPE *argtype, OMPACCEL
505505 argtype++;
506506 STYPEP (sym, ST_VAR);
507507 aux.dpdsc_base [dpdscp++] = sym;
508+ // AOC begin
508509 if (current_tinfo)
509510 {
510511 NEED ((current_tinfo->n_symbols + 1 ), current_tinfo->symbols , OMPACCEL_SYM,
511512 current_tinfo->sz_symbols , current_tinfo->sz_symbols * 2 );
512- if (cnt >= 2 )
513+ current_tinfo->symbols [current_tinfo->n_symbols ].device_sym = static_cast <SPTR>(sym);
514+ if (cnt >= 2 ) {
515+ PASSBYVALP (sym, false );
516+ PASSBYREFP (sym, true );
513517 current_tinfo->symbols [current_tinfo->n_symbols ].host_sym =
514518 ompaccel_tinfo_get (gbl.currsub )->symbols [cnt-2 ].device_sym ;
515- current_tinfo-> symbols [current_tinfo-> n_symbols ]. device_sym = static_cast <SPTR>(sym);
516- current_tinfo->symbols [current_tinfo->n_symbols ].map_type = 0 ;
517- current_tinfo->symbols [current_tinfo->n_symbols ].in_map = 0 ; // AOCC
518- current_tinfo->n_symbols ++;
519- cnt++;
519+ }
520+ current_tinfo->symbols [current_tinfo->n_symbols ].map_type = 0 ;
521+ current_tinfo->symbols [current_tinfo->n_symbols ].in_map = 0 ;
522+ current_tinfo->n_symbols ++;
523+ cnt++;
520524 }
525+ // AOCC end
521526 }
522527}
523528
@@ -2443,13 +2448,6 @@ llMakeFtnOutlinedSignatureTarget(SPTR func_sptr, OMPACCEL_TINFO *current_tinfo,
24432448 sym = ompaccel_create_device_symbol (sptr, count);
24442449 count++;
24452450 current_tinfo->symbols [i].device_sym = sym;
2446- if (is_SPMD_mode (current_tinfo->mode ) && DTYPEG (sym) != DT_INT8)
2447- {
2448- PASSBYVALP (sym, 1 );
2449- DTYPEP (sym, get_type (2 , TY_PTR, DTYPEG (sym)));
2450- } else {
2451- PASSBYVALP (sym, 0 );
2452- }
24532451 OMPACCDEVSYMP (sym, TRUE );
24542452 aux.dpdsc_base [dpdscp++] = sym;
24552453 }
@@ -2685,11 +2683,8 @@ ll_make_helper_function_for_kmpc_parallel_51(SPTR scope_sptr, OMPACCEL_TINFO *or
26852683 func_args[1 ] = get_type (2 , TY_PTR, DT_INT8);// DT_CPTR; // bound_tid
26862684
26872685 for (int k = 2 ; k < func_args_cnt; k++) {
2688- if (DTYPEG (symbols->device_sym ) == DT_INT8 ) {
2689- func_args[k] = get_type (2 , TY_PTR, DT_INT8);
2690- }
2691- else {
2692- func_args[k] = DTYPEG (symbols->device_sym );}
2686+ func_args[k] = DTYPEG (symbols->device_sym );
2687+ PASSBYVALP (symbols->device_sym , false );
26932688 symbols++;
26942689 }
26952690
@@ -2709,7 +2704,7 @@ ll_make_helper_function_for_kmpc_parallel_51(SPTR scope_sptr, OMPACCEL_TINFO *or
27092704 OMPACCFUNCDEVP (func_sptr, 1 );
27102705 current_tinfo = ompaccel_tinfo_create (func_sptr, max_nargs);
27112706 ll_make_ftn_outlined_params (func_sptr, func_args_cnt, func_args.data (), current_tinfo);
2712- ll_process_routine_parameters (func_sptr);
2707+ ll_process_routine_parameters (func_sptr);
27132708 return func_sptr;
27142709}
27152710
0 commit comments