forked from OSchip/llvm-project
[Libomptarget] Add unroll flag to shared variables loop
Unrolling this loop provides better performance in practice because it is executed on the device and is likely to be very small. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D106692
This commit is contained in:
parent
d71fc323f9
commit
e1dedecaa6
|
@ -314,6 +314,7 @@ EXTERN void __kmpc_parallel_51(kmp_Ident *ident, kmp_int32 global_tid,
|
|||
void **GlobalArgs;
|
||||
__kmpc_begin_sharing_variables(&GlobalArgs, nargs);
|
||||
// TODO: faster memcpy?
|
||||
#pragma unroll
|
||||
for (int I = 0; I < nargs; I++)
|
||||
GlobalArgs[I] = args[I];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue