[all-commits] [llvm/llvm-project] 8e0070: [Clang][OpenMP] Fix runtime problem when explicit ...

jyu2-git via All-commits all-commits at lists.llvm.org
Wed May 15 08:20:47 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8e00703be9ceb41d9b80c2bc8f024a9610b9aaa1
      https://github.com/llvm/llvm-project/commit/8e00703be9ceb41d9b80c2bc8f024a9610b9aaa1
  Author: jyu2-git <jennifer.yu at intel.com>
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
    M clang/lib/CodeGen/CGOpenMPRuntime.cpp
    A clang/test/OpenMP/target_map_both_pointer_pointee_codegen.cpp
    A offload/test/mapping/map_both_pointer_pointee.c

  Log Message:
  -----------
  [Clang][OpenMP] Fix runtime problem when explicit map both pointer and pointee (#92210)

ponter int *p for following map, test currently crash.

  map(p, p[:100]) or map(p, p[1])

Currly IR looks like
// &p, &p, sizeof(int), TARGET_PARAM | TO | FROM
// &p, p[0], 100sizeof(float) TO | FROM

Worrking IR is
// map(p, p[0:100]) to map(p[0:100])
// &p, &p[0], 100*sizeof(float), TARGET_PARAM | TO | FROM | PTR_AND_OBJ

The change is add new argument AreBothBasePtrAndPteeMapped in
generateInfoForComponentList

Use that to skip map for map(p), when processing map(p[:100]) generate
map with right flag.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list