[OPENMP]Do not add TGT_OMP_TARGET_PARAM flag to non-captured mapped arguments.
If the arguments are mapped, but are actually not used in the target region, the compiler still adds attribute TGT_OMP_TARGET_PARAM for such arguments. It makes the libomptarget to add such parameters to the list of arguments, passed to the kernel at the runtime, and may lead to incorrect results/crashes during execution. Differential Revision: https://reviews.llvm.org/D85755
Loading
Please sign in to comment