[all-commits] [llvm/llvm-project] 30cc71: [Clang][OpenMP] Fix run time crash when use_device...

jyu2-git via All-commits all-commits at lists.llvm.org
Tue Sep 27 11:57:59 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 30cc712eb6f23a5c7beaae669bf2ab6beede7f20
      https://github.com/llvm/llvm-project/commit/30cc712eb6f23a5c7beaae669bf2ab6beede7f20
  Author: Jennifer Yu <jennifer.yu at intel.com>
  Date:   2022-09-27 (Tue, 27 Sep 2022)

  Changed paths:
    M clang/lib/CodeGen/CGOpenMPRuntime.cpp
    M clang/test/OpenMP/target_data_codegen.cpp
    A openmp/libomptarget/test/mapping/target_use_device_addr.c

  Log Message:
  -----------
  [Clang][OpenMP] Fix run time crash when use_device_addr is used.

It is data mapping ordering problem.

According omp spec
If one or more map clauses are present, the list item conversions that
are performed for any use_device_ptr or use_device_addr clause occur
after all variables are mapped on entry to the region according to those
map clauses.

The change is to put mapping data for use_device_addr at end of data
mapping array.

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




More information about the All-commits mailing list