[all-commits] [llvm/llvm-project] 071dca: [OpenMP] Require trivially copyable type for mapping

Jonas Hahnfeld via All-commits all-commits at lists.llvm.org
Sat Dec 7 04:32:19 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 071dca24cea9dcabe25cbe98c4053d874183be37
      https://github.com/llvm/llvm-project/commit/071dca24cea9dcabe25cbe98c4053d874183be37
  Author: Jonas Hahnfeld <hahnjo at hahnjo.de>
  Date:   2019-12-07 (Sat, 07 Dec 2019)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaOpenMP.cpp
    M clang/test/OpenMP/distribute_firstprivate_messages.cpp
    M clang/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp
    M clang/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp
    M clang/test/OpenMP/distribute_parallel_for_private_messages.cpp
    M clang/test/OpenMP/distribute_parallel_for_reduction_messages.cpp
    M clang/test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp
    M clang/test/OpenMP/distribute_parallel_for_simd_private_messages.cpp
    M clang/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp
    M clang/test/OpenMP/distribute_simd_aligned_messages.cpp
    M clang/test/OpenMP/distribute_simd_firstprivate_messages.cpp
    M clang/test/OpenMP/distribute_simd_lastprivate_messages.cpp
    M clang/test/OpenMP/distribute_simd_linear_messages.cpp
    M clang/test/OpenMP/distribute_simd_loop_messages.cpp
    M clang/test/OpenMP/distribute_simd_private_messages.cpp
    M clang/test/OpenMP/distribute_simd_reduction_messages.cpp
    M clang/test/OpenMP/target_firstprivate_messages.cpp
    M clang/test/OpenMP/target_parallel_for_private_messages.cpp
    M clang/test/OpenMP/target_parallel_for_simd_private_messages.cpp
    M clang/test/OpenMP/target_private_messages.cpp
    M clang/test/OpenMP/target_simd_private_messages.cpp
    M clang/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp
    M clang/test/OpenMP/teams_distribute_loop_messages.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_aligned_messages.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp
    M clang/test/OpenMP/teams_distribute_simd_aligned_messages.cpp
    M clang/test/OpenMP/teams_distribute_simd_linear_messages.cpp
    M clang/test/OpenMP/teams_distribute_simd_loop_messages.cpp

  Log Message:
  -----------
  [OpenMP] Require trivially copyable type for mapping

A trivially copyable type provides a trivial copy constructor and a trivial
copy assignment operator. This is enough for the runtime to memcpy the data
to the device. Additionally there must be no virtual functions or virtual
base classes and the destructor is guaranteed to be trivial, ie performs
no action.
The runtime does not require trivial default constructors because on alloc
the memory is undefined. Thus, weaken the warning to be only issued if the
mapped type is not trivially copyable.

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




More information about the All-commits mailing list