[Openmp-commits] [PATCH] D129608: [Clang][OpenMP] Fix segmentation fault when data field is used in is_device_pt.
Alexey Bataev via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Aug 11 12:17:52 PDT 2022
ABataev added inline comments.
================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9080
+ DeclComponentLists.emplace_back(
+ MCL, OMPC_MAP_to, OMPC_MAP_MODIFIER_unknown, /*IsImpicit = */ true,
+ nullptr, nullptr);
----------------
Shall it be `OMP_MAP_LITERAL`? Previously we emitted `OMP_MAP_LITERAL` for such items (line 9062)
================
Comment at: clang/test/OpenMP/target_is_device_ptr_codegen.cpp:260
+// CK2-DAG: store [[ST]]* [[THIS1]], [[ST]]** [[CBP0]]
+// CK2-DAG: store double** %a, double*** [[TMP3:%.+]]
#pragma omp target is_device_ptr(a)
----------------
```
// CK2-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to double**
// CK2-DAG: store double** [[A]], double*** [[CP0]]
```
?
================
Comment at: clang/test/OpenMP/target_is_device_ptr_codegen.cpp:278-279
// CK2-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]**
-// CK2-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[ST]]**
-// CK2-DAG: store [[ST]]* [[VAR0:%.+]], [[ST]]** [[CBP0]]
-// CK2-DAG: store [[ST]]* [[VAR0]], [[ST]]** [[CP0]]
+// CK2-DAG: store %struct.ST* [[THIS1]], %struct.ST** [[CBP0]]
+// CK2-DAG: store double*** [[B]], double**** [[TMP30:%.+]]
#pragma omp target is_device_ptr(b)
----------------
Format and checks.
================
Comment at: clang/test/OpenMP/target_is_device_ptr_codegen.cpp:299
+// CK2-DAG: store %struct.ST* [[THIS1]], %struct.ST** [[CBP0]]
+// CK2-DAG: store double** [[A8]], double*** [[TMP64:%.+]]
#pragma omp target is_device_ptr(a, b)
----------------
same
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129608/new/
https://reviews.llvm.org/D129608
More information about the Openmp-commits
mailing list