llvm-project/openmp/libomptarget/test/mapping
Jennifer Yu c274b19866 Add implicit map for a list item appears in a reduction clause.
A new rule is added in 5.0:
If a list item appears in a reduction, lastprivate or linear clause
on a combined target construct then it is treated as if it also appears
in a map clause with a map-type of tofrom.

Currently map clauses for all capture variables are added implicitly.
But missing for list item of expression for array elements or array
sections.

The change is to add implicit map clause for array of elements used in
reduction clause. Skip adding map clause if the expression is not
mappable.
Noted: For linear and lastprivate, since only variable name is
accepted, the map has been added though capture variables.

To do so:
During the mappable checking, if error, ignore diagnose and skip
adding implicit map clause.

The changes:
1> Add code to generate implicit map in ActOnOpenMPExecutableDirective,
   for omp 5.0 and up.
2> Add extra default parameter NoDiagnose in ActOnOpenMPMapClause:
Use that to skip error as well as skip adding implicit map during the
mappable checking.

Note: there are only tow places need to be check for NoDiagnose. Rest
of them either the check is for < omp 5.0 or the error already generated for
reduction clause.

Differential Revision: https://reviews.llvm.org/D108132
2021-08-19 12:53:47 -07:00
..
present [OpenMP] Test unified shared memory tests only on systems that support it. 2021-05-13 11:08:04 -05:00
alloc_fail.c [OpenMP][libomptarget] Separate lit tests for different offloading targets (2/2) 2021-04-27 15:54:32 +02:00
data_absent_at_exit.c [OpenMP][libomptarget] Separate lit tests for different offloading targets (2/2) 2021-04-27 15:54:32 +02:00
data_member_ref.cpp [AMDGPU][OpenMP] Enable Libomptarget runtime tests 2021-05-03 05:56:42 +00:00
declare_mapper_api.cpp [OpenMP][libomptarget] Separate lit tests for different offloading targets (2/2) 2021-04-27 15:54:32 +02:00
declare_mapper_nested_default_mappers.cpp [AMDGPU][OpenMP] Enable Libomptarget runtime tests 2021-05-03 05:56:42 +00:00
declare_mapper_nested_default_mappers_array.cpp [OPENMP]Mark test as unsupported to avoid possible unexpected passes, 2021-04-22 08:06:25 -07:00
declare_mapper_nested_default_mappers_array_subscript.cpp [OPENMP]Fix PR49698: OpenMP declare mapper causes segmentation fault. 2021-04-21 10:38:31 -07:00
declare_mapper_nested_default_mappers_complex_structure.cpp [OPENMP]Fix PR49698: OpenMP declare mapper causes segmentation fault. 2021-04-21 10:38:31 -07:00
declare_mapper_nested_default_mappers_ptr_subscript.cpp [OPENMP]Fix PR49698: OpenMP declare mapper causes segmentation fault. 2021-04-21 10:38:31 -07:00
declare_mapper_nested_default_mappers_var.cpp [OPENMP]Fix PR49698: OpenMP declare mapper causes segmentation fault. 2021-04-21 10:38:31 -07:00
declare_mapper_nested_mappers.cpp [AMDGPU][OpenMP] Enable Libomptarget runtime tests 2021-05-03 05:56:42 +00:00
declare_mapper_target.cpp [OpenMP][libomptarget] Separate lit tests for different offloading targets (2/2) 2021-04-27 15:54:32 +02:00
declare_mapper_target_data.cpp [OpenMP][libomptarget] Separate lit tests for different offloading targets (2/2) 2021-04-27 15:54:32 +02:00
declare_mapper_target_data_enter_exit.cpp [OpenMP][libomptarget] Separate lit tests for different offloading targets (2/2) 2021-04-27 15:54:32 +02:00
declare_mapper_target_update.cpp [OpenMP][libomptarget] Separate lit tests for different offloading targets (2/2) 2021-04-27 15:54:32 +02:00
delete_inf_refcount.c [AMDGPU][OpenMP] Enable Libomptarget runtime tests 2021-05-03 05:56:42 +00:00
device_ptr_update.c [libomptarget] Update device pointer only if needed 2021-07-13 04:18:55 -07:00
lambda_by_value.cpp [AMDGPU][Libomptarget] Mark lambda_by_value test as XFAIL 2021-05-25 12:16:54 +00:00
lambda_mapping.cpp [OpenMP][libomptarget] Separate lit tests for different offloading targets (2/2) 2021-04-27 15:54:32 +02:00
pr38704.c [OpenMP][libomptarget] Separate lit tests for different offloading targets (2/2) 2021-04-27 15:54:32 +02:00
private_mapping.c [OpenMP][libomptarget] Separate lit tests for different offloading targets (2/2) 2021-04-27 15:54:32 +02:00
ptr_and_obj_motion.c [AMDGPU][OpenMP] Enable Libomptarget runtime tests 2021-05-03 05:56:42 +00:00
reduction_implicit_map.cpp Add implicit map for a list item appears in a reduction clause. 2021-08-19 12:53:47 -07:00
target_data_array_extension_at_exit.c [OpenMP][libomptarget] Separate lit tests for different offloading targets (2/2) 2021-04-27 15:54:32 +02:00
target_implicit_partial_map.c [OpenMP][libomptarget] Separate lit tests for different offloading targets (2/2) 2021-04-27 15:54:32 +02:00
target_pointers_members_map.cpp [OPENMP]Fix overlapped mapping for dereferenced pointer members. 2021-07-09 12:51:26 -07:00
target_update_array_extension.c [OpenMP][libomptarget] Separate lit tests for different offloading targets (2/2) 2021-04-27 15:54:32 +02:00