[PATCH] D72811: [WIP][OPENMP5.0] allow lvalue for motion clause

Chi Chun Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 23 15:30:51 PST 2020


cchen updated this revision to Diff 240029.
cchen added a comment.

Add a checker for locator (test is not complete yet).

The logic of finding basic decl in LocatorChecker:

- `int *B; omp target map(*B)`
  - B
    - pointer count (* in type): 1
    - deref count: 1
    - B is basic decl since pointer count equal to deref count
- `int *B, l; omp target map(*(B+l))`
  - B
    - pointer count (* in type): 1
    - deref count: 1
    - B is basic decl since pointer count equal to deref count
  - l
    - pointer count (* in type): 0
    - deref count: 1
    - pointer count = 0, deref count 1 => not equal
- `int **B, **l; omp target map((B+**l)[1][2]`
  - B
    - pointer count (* in type): 2
    - deref count: 2 (2 array subscript)
    - B is basic decl since pointer count equal to deref count
  - l
    - pointer count (* in type): 2
    - deref count: 4 (2 array subscript, 2 unary op)
    - pointer count = 2, deref count 4 => not equal


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72811/new/

https://reviews.llvm.org/D72811

Files:
  clang/lib/CodeGen/CGOpenMPRuntime.cpp
  clang/lib/Sema/SemaOpenMP.cpp
  clang/test/OpenMP/target_map_messages.cpp
  clang/test/OpenMP/target_parallel_for_map_messages.cpp
  clang/test/OpenMP/target_parallel_for_simd_map_messages.cpp
  clang/test/OpenMP/target_parallel_map_messages.cpp
  clang/test/OpenMP/target_simd_map_messages.cpp
  clang/test/OpenMP/target_teams_distribute_map_messages.cpp
  clang/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp
  clang/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp
  clang/test/OpenMP/target_teams_distribute_simd_map_messages.cpp
  clang/test/OpenMP/target_teams_map_messages.cpp
  clang/test/OpenMP/target_update_codegen.cpp
  clang/test/OpenMP/target_update_from_messages.cpp
  clang/test/OpenMP/target_update_to_messages.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72811.240029.patch
Type: text/x-patch
Size: 68285 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200123/bc697535/attachment-0001.bin>


More information about the cfe-commits mailing list