[clang] [llvm] [OpenMP][WIP] Use ATTACH maps for array-sections/subscripts on pointers. (PR #153683)

Abhinav Gaba via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 14 14:24:38 PDT 2025


================
@@ -40,11 +40,28 @@ void foo() {
 }
 #endif
 
-// CHECK: @.offload_sizes = private unnamed_addr constant [5 x i64] [i64 8, i64 0, i64 0, i64 0, i64 4]
-// CHECK-NOT: @.offload_sizes = private unnamed_addr constant [6 x i64] [i64 8, i64 0, i64 0, i64 0, i64 8, i64 4]
-// CHECK: @.offload_maptypes = private unnamed_addr constant [5 x i64] [i64 35, i64 16, i64 562949953421315, i64 562949953421315, i64 562949953421827]
-// CHECK-NOT: .offload_maptypes = private unnamed_addr constant  [6 x i64] [i64 35, i64 0, i64 562949953421315, i64 562949953421315, i64 562949953421827, i64 562949953421843]
-// CHECK: @.offload_sizes.1 = private unnamed_addr constant [4 x i64] [i64 0, i64 0, i64 0, i64 4]
-// CHECK: @.offload_maptypes.2 = private unnamed_addr constant [4 x i64] [i64 32, i64 281474976710659, i64 281474976710659, i64 281474976711171]
-// CHECK: @.offload_sizes.3 = private unnamed_addr constant [6 x i64] [i64 8, i64 8, i64 0, i64 0, i64 0, i64 4]
-// CHECK: @.offload_maptypes.4 = private unnamed_addr constant [6 x i64] [i64 35, i64 16, i64 16, i64 844424930131971, i64 844424930131971, i64 844424930132483]
+// &spp[0],    &spp[0],      0,                 IMPLICIT | PARAM
----------------
abhinavgaba wrote:

This shows how we handle mapping of struct-members that have the same attach-ptr. They are allocated as a contiguous chunk.

https://github.com/llvm/llvm-project/pull/153683


More information about the cfe-commits mailing list