This is an archive of the discontinued LLVM Phabricator instance.

[OPENMP]Do not add TGT_OMP_TARGET_PARAM flag to non-captured mapped arguments.
ClosedPublic

Authored by ABataev on Aug 11 2020, 10:09 AM.

Details

Summary

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.

Diff Detail

Event Timeline

ABataev created this revision.Aug 11 2020, 10:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 11 2020, 10:09 AM
ABataev requested review of this revision.Aug 11 2020, 10:09 AM
jdoerfert accepted this revision.Aug 11 2020, 7:36 PM

I don't follow this logic but that is not going to change right now. LGTM

This revision is now accepted and ready to land.Aug 11 2020, 7:36 PM