[all-commits] [llvm/llvm-project] ab8989: [OPENMP]Fix overlapped mapping for dereferenced po...

cilkplus via All-commits all-commits at lists.llvm.org
Fri Jul 9 12:52:19 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ab8989ab8710c693e83edbccf221746c897c835f
      https://github.com/llvm/llvm-project/commit/ab8989ab8710c693e83edbccf221746c897c835f
  Author: Alexey Bataev <a.bataev at outlook.com>
  Date:   2021-07-09 (Fri, 09 Jul 2021)

  Changed paths:
    M clang/lib/CodeGen/CGOpenMPRuntime.cpp
    M clang/test/OpenMP/target_map_codegen_29.cpp
    A openmp/libomptarget/test/mapping/target_pointers_members_map.cpp

  Log Message:
  -----------
  [OPENMP]Fix overlapped mapping for dereferenced pointer members.

If the base is used in a map clause and later we have a memberexpr with
this base, and the member is a pointer, and this pointer is dereferenced
anyhow (subscript, array section, dereference, etc.), such components
should be considered as overlapped, otherwise it may lead to incorrect
size computations, since we try to map a pointee as a part of the whole
struct, which is not true for the pointer members.

Differential Revision: https://reviews.llvm.org/D105562




More information about the All-commits mailing list