[all-commits] [llvm/llvm-project] fe29a1: This is to fix runtime problem for member data use...
jyu2-git via All-commits
all-commits at lists.llvm.org
Tue Jan 10 17:14:42 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fe29a1695a6c69eb6616db01a559a3804d55fde8
https://github.com/llvm/llvm-project/commit/fe29a1695a6c69eb6616db01a559a3804d55fde8
Author: Jennifer Yu <jennifer.yu at intel.com>
Date: 2023-01-10 (Tue, 10 Jan 2023)
Changed paths:
M clang/lib/CodeGen/CGOpenMPRuntime.cpp
A clang/test/OpenMP/target_map_member_expr_codegen.cpp
A openmp/libomptarget/test/mapping/target_map_for_member_data.cpp
Log Message:
-----------
This is to fix runtime problem for member data used in target region.
The problem is happened when base class member field is used in target
region , the size is wrong, cause runtime to fail. Currently the size of
calculation is depended on index of field, since field is in base class,
the calculation is wrong.
According OpenMP 5.2 148:21:
If the target construct is within a class non-static member function,
and a variable is an accessible data member of the object for which the
non-static data member function is invoked, the variable is treated as
if the this[:1] expression had appeared in a map clause with a map-type
of tofrom.
One way to fix this is emitting code to generate this[:1] instead only
when class has any base class.
Differential Revision: https://reviews.llvm.org/D141350
More information about the All-commits
mailing list