@@ -232,38 +232,38 @@ func.func @_QPomp_target_data() {
232
232
%c0 = arith.constant 0 : index
233
233
%4 = arith.subi %c1024, %c1 : index
234
234
%5 = omp.bounds lower_bound(%c0 : index) upper_bound(%4 : index) extent(%c1024 : index) stride(%c1 : index) start_idx(%c1 : index)
235
- %6 = omp.map_info var_ptr(%0 : !fir.ref<!fir.array<1024xi32>>) map_clauses(to) capture(ByRef) bounds(%5) -> !fir.ref<!fir.array<1024xi32>> {name = "a"}
235
+ %6 = omp.map_info var_ptr(%0 : !fir.ref<!fir.array<1024xi32>>, !fir.array<1024xi32> ) map_clauses(to) capture(ByRef) bounds(%5) -> !fir.ref<!fir.array<1024xi32>> {name = "a"}
236
236
%c1_3 = arith.constant 1 : index
237
237
%c0_4 = arith.constant 0 : index
238
238
%7 = arith.subi %c1024_0, %c1_3 : index
239
239
%8 = omp.bounds lower_bound(%c0_4 : index) upper_bound(%7 : index) extent(%c1024_0 : index) stride(%c1_3 : index) start_idx(%c1_3 : index)
240
- %9 = omp.map_info var_ptr(%1 : !fir.ref<!fir.array<1024xi32>>) map_clauses(to) capture(ByRef) bounds(%8) -> !fir.ref<!fir.array<1024xi32>> {name = "b"}
240
+ %9 = omp.map_info var_ptr(%1 : !fir.ref<!fir.array<1024xi32>>, !fir.array<1024xi32> ) map_clauses(to) capture(ByRef) bounds(%8) -> !fir.ref<!fir.array<1024xi32>> {name = "b"}
241
241
%c1_5 = arith.constant 1 : index
242
242
%c0_6 = arith.constant 0 : index
243
243
%10 = arith.subi %c1024_1, %c1_5 : index
244
244
%11 = omp.bounds lower_bound(%c0_6 : index) upper_bound(%10 : index) extent(%c1024_1 : index) stride(%c1_5 : index) start_idx(%c1_5 : index)
245
- %12 = omp.map_info var_ptr(%2 : !fir.ref<!fir.array<1024xi32>>) map_clauses(always, exit_release _or_enter_alloc) capture(ByRef) bounds(%11) -> !fir.ref<!fir.array<1024xi32>> {name = "c" }
245
+ %12 = omp.map_info var_ptr(%2 : !fir.ref<!fir.array<1024xi32>>, !fir.array<1024xi32> ) map_clauses(always, exit_release _or_enter_alloc) capture(ByRef) bounds(%11) -> !fir.ref<!fir.array<1024xi32>> {name = "c" }
246
246
omp.target_enter_data map_entries(%6, %9, %12 : !fir.ref<!fir.array<1024xi32>>, !fir.ref<!fir.array<1024xi32>>, !fir.ref<!fir.array<1024xi32>>)
247
247
%c1_7 = arith.constant 1 : index
248
248
%c0_8 = arith.constant 0 : index
249
249
%13 = arith.subi %c1024, %c1_7 : index
250
250
%14 = omp.bounds lower_bound(%c0_8 : index) upper_bound(%13 : index) extent(%c1024 : index) stride(%c1_7 : index) start_idx(%c1_7 : index)
251
- %15 = omp.map_info var_ptr(%0 : !fir.ref<!fir.array<1024xi32>>) map_clauses(from) capture(ByRef) bounds(%14) -> !fir.ref<!fir.array<1024xi32>> {name = "a"}
251
+ %15 = omp.map_info var_ptr(%0 : !fir.ref<!fir.array<1024xi32>>, !fir.array<1024xi32> ) map_clauses(from) capture(ByRef) bounds(%14) -> !fir.ref<!fir.array<1024xi32>> {name = "a"}
252
252
%c1_9 = arith.constant 1 : index
253
253
%c0_10 = arith.constant 0 : index
254
254
%16 = arith.subi %c1024_0, %c1_9 : index
255
255
%17 = omp.bounds lower_bound(%c0_10 : index) upper_bound(%16 : index) extent(%c1024_0 : index) stride(%c1_9 : index) start_idx(%c1_9 : index)
256
- %18 = omp.map_info var_ptr(%1 : !fir.ref<!fir.array<1024xi32>>) map_clauses(from) capture(ByRef) bounds(%17) -> !fir.ref<!fir.array<1024xi32>> {name = "b"}
256
+ %18 = omp.map_info var_ptr(%1 : !fir.ref<!fir.array<1024xi32>>, !fir.array<1024xi32> ) map_clauses(from) capture(ByRef) bounds(%17) -> !fir.ref<!fir.array<1024xi32>> {name = "b"}
257
257
%c1_11 = arith.constant 1 : index
258
258
%c0_12 = arith.constant 0 : index
259
259
%19 = arith.subi %c1024_1, %c1_11 : index
260
260
%20 = omp.bounds lower_bound(%c0_12 : index) upper_bound(%19 : index) extent(%c1024_1 : index) stride(%c1_11 : index) start_idx(%c1_11 : index)
261
- %21 = omp.map_info var_ptr(%2 : !fir.ref<!fir.array<1024xi32>>) map_clauses(exit_release _or_enter_alloc) capture(ByRef) bounds(%20) -> !fir.ref<!fir.array<1024xi32>> {name = "c" }
261
+ %21 = omp.map_info var_ptr(%2 : !fir.ref<!fir.array<1024xi32>>, !fir.array<1024xi32> ) map_clauses(exit_release _or_enter_alloc) capture(ByRef) bounds(%20) -> !fir.ref<!fir.array<1024xi32>> {name = "c" }
262
262
%c1_13 = arith.constant 1 : index
263
263
%c0_14 = arith.constant 0 : index
264
264
%22 = arith.subi %c1024_2, %c1_13 : index
265
265
%23 = omp.bounds lower_bound(%c0_14 : index) upper_bound(%22 : index) extent(%c1024_2 : index) stride(%c1_13 : index) start_idx(%c1_13 : index)
266
- %24 = omp.map_info var_ptr(%3 : !fir.ref<!fir.array<1024xi32>>) map_clauses(always, delete) capture(ByRef) bounds(%23) -> !fir.ref<!fir.array<1024xi32>> {name = "d"}
266
+ %24 = omp.map_info var_ptr(%3 : !fir.ref<!fir.array<1024xi32>>, !fir.array<1024xi32> ) map_clauses(always, delete) capture(ByRef) bounds(%23) -> !fir.ref<!fir.array<1024xi32>> {name = "d"}
267
267
omp.target_exit_data map_entries(%15, %18, %21, %24 : !fir.ref<!fir.array<1024xi32>>, !fir.ref<!fir.array<1024xi32>>, !fir.ref<!fir.array<1024xi32>>, !fir.ref<!fir.array<1024xi32>>)
268
268
return
269
269
}
@@ -285,38 +285,38 @@ func.func @_QPomp_target_data() {
285
285
// CHECK: %13 = llvm.mlir.constant(0 : index) : i64
286
286
// CHECK: %14 = llvm.mlir.constant(1023 : index) : i64
287
287
// CHECK: %15 = omp.bounds lower_bound(%13 : i64) upper_bound(%14 : i64) extent(%0 : i64) stride(%12 : i64) start_idx(%12 : i64)
288
- // CHECK: %16 = omp.map_info var_ptr(%[[VAL_1]] : !llvm.ptr<array<1024 x i32>>) map_clauses(to) capture(ByRef) bounds(%15) -> !llvm.ptr<array<1024 x i32>> {name = "a"}
288
+ // CHECK: %16 = omp.map_info var_ptr(%[[VAL_1]] : !llvm.ptr<array<1024 x i32>>, !llvm.array<1024 x i32> ) map_clauses(to) capture(ByRef) bounds(%15) -> !llvm.ptr<array<1024 x i32>> {name = "a"}
289
289
// CHECK: %17 = llvm.mlir.constant(1 : index) : i64
290
290
// CHECK: %18 = llvm.mlir.constant(0 : index) : i64
291
291
// CHECK: %19 = llvm.mlir.constant(1023 : index) : i64
292
292
// CHECK: %20 = omp.bounds lower_bound(%18 : i64) upper_bound(%19 : i64) extent(%3 : i64) stride(%17 : i64) start_idx(%17 : i64)
293
- // CHECK: %21 = omp.map_info var_ptr(%[[VAL_3]] : !llvm.ptr<array<1024 x i32>>) map_clauses(to) capture(ByRef) bounds(%20) -> !llvm.ptr<array<1024 x i32>> {name = "b"}
293
+ // CHECK: %21 = omp.map_info var_ptr(%[[VAL_3]] : !llvm.ptr<array<1024 x i32>>, !llvm.array<1024 x i32> ) map_clauses(to) capture(ByRef) bounds(%20) -> !llvm.ptr<array<1024 x i32>> {name = "b"}
294
294
// CHECK: %22 = llvm.mlir.constant(1 : index) : i64
295
295
// CHECK: %23 = llvm.mlir.constant(0 : index) : i64
296
296
// CHECK: %24 = llvm.mlir.constant(1023 : index) : i64
297
297
// CHECK: %25 = omp.bounds lower_bound(%23 : i64) upper_bound(%24 : i64) extent(%6 : i64) stride(%22 : i64) start_idx(%22 : i64)
298
- // CHECK: %26 = omp.map_info var_ptr(%[[VAL_5]] : !llvm.ptr<array<1024 x i32>>) map_clauses(always, exit_release _or_enter_alloc) capture(ByRef) bounds(%25) -> !llvm.ptr<array<1024 x i32>> {name = "c" }
298
+ // CHECK: %26 = omp.map_info var_ptr(%[[VAL_5]] : !llvm.ptr<array<1024 x i32>>, !llvm.array<1024 x i32> ) map_clauses(always, exit_release _or_enter_alloc) capture(ByRef) bounds(%25) -> !llvm.ptr<array<1024 x i32>> {name = "c" }
299
299
// CHECK: omp.target_enter_data map_entries(%16, %21, %26 : !llvm.ptr<array<1024 x i32>>, !llvm.ptr<array<1024 x i32>>, !llvm.ptr<array<1024 x i32>>)
300
300
// CHECK: %27 = llvm.mlir.constant(1 : index) : i64
301
301
// CHECK: %28 = llvm.mlir.constant(0 : index) : i64
302
302
// CHECK: %29 = llvm.mlir.constant(1023 : index) : i64
303
303
// CHECK: %30 = omp.bounds lower_bound(%28 : i64) upper_bound(%29 : i64) extent(%0 : i64) stride(%27 : i64) start_idx(%27 : i64)
304
- // CHECK: %31 = omp.map_info var_ptr(%[[VAL_1]] : !llvm.ptr<array<1024 x i32>>) map_clauses(from) capture(ByRef) bounds(%30) -> !llvm.ptr<array<1024 x i32>> {name = "a"}
304
+ // CHECK: %31 = omp.map_info var_ptr(%[[VAL_1]] : !llvm.ptr<array<1024 x i32>>, !llvm.array<1024 x i32> ) map_clauses(from) capture(ByRef) bounds(%30) -> !llvm.ptr<array<1024 x i32>> {name = "a"}
305
305
// CHECK: %32 = llvm.mlir.constant(1 : index) : i64
306
306
// CHECK: %33 = llvm.mlir.constant(0 : index) : i64
307
307
// CHECK: %34 = llvm.mlir.constant(1023 : index) : i64
308
308
// CHECK: %35 = omp.bounds lower_bound(%33 : i64) upper_bound(%34 : i64) extent(%3 : i64) stride(%32 : i64) start_idx(%32 : i64)
309
- // CHECK: %36 = omp.map_info var_ptr(%[[VAL_3]] : !llvm.ptr<array<1024 x i32>>) map_clauses(from) capture(ByRef) bounds(%35) -> !llvm.ptr<array<1024 x i32>> {name = "b"}
309
+ // CHECK: %36 = omp.map_info var_ptr(%[[VAL_3]] : !llvm.ptr<array<1024 x i32>>, !llvm.array<1024 x i32> ) map_clauses(from) capture(ByRef) bounds(%35) -> !llvm.ptr<array<1024 x i32>> {name = "b"}
310
310
// CHECK: %37 = llvm.mlir.constant(1 : index) : i64
311
311
// CHECK: %38 = llvm.mlir.constant(0 : index) : i64
312
312
// CHECK: %39 = llvm.mlir.constant(1023 : index) : i64
313
313
// CHECK: %40 = omp.bounds lower_bound(%38 : i64) upper_bound(%39 : i64) extent(%6 : i64) stride(%37 : i64) start_idx(%37 : i64)
314
- // CHECK: %41 = omp.map_info var_ptr(%[[VAL_5]] : !llvm.ptr<array<1024 x i32>>) map_clauses(exit_release _or_enter_alloc) capture(ByRef) bounds(%40) -> !llvm.ptr<array<1024 x i32>> {name = "c" }
314
+ // CHECK: %41 = omp.map_info var_ptr(%[[VAL_5]] : !llvm.ptr<array<1024 x i32>>, !llvm.array<1024 x i32> ) map_clauses(exit_release _or_enter_alloc) capture(ByRef) bounds(%40) -> !llvm.ptr<array<1024 x i32>> {name = "c" }
315
315
// CHECK: %42 = llvm.mlir.constant(1 : index) : i64
316
316
// CHECK: %43 = llvm.mlir.constant(0 : index) : i64
317
317
// CHECK: %44 = llvm.mlir.constant(1023 : index) : i64
318
318
// CHECK: %45 = omp.bounds lower_bound(%43 : i64) upper_bound(%44 : i64) extent(%9 : i64) stride(%42 : i64) start_idx(%42 : i64)
319
- // CHECK: %46 = omp.map_info var_ptr(%[[VAL_7]] : !llvm.ptr<array<1024 x i32>>) map_clauses(always, delete) capture(ByRef) bounds(%45) -> !llvm.ptr<array<1024 x i32>> {name = "d"}
319
+ // CHECK: %46 = omp.map_info var_ptr(%[[VAL_7]] : !llvm.ptr<array<1024 x i32>>, !llvm.array<1024 x i32> ) map_clauses(always, delete) capture(ByRef) bounds(%45) -> !llvm.ptr<array<1024 x i32>> {name = "d"}
320
320
// CHECK: omp.target_exit_data map_entries(%31, %36, %41, %46 : !llvm.ptr<array<1024 x i32>>, !llvm.ptr<array<1024 x i32>>, !llvm.ptr<array<1024 x i32>>, !llvm.ptr<array<1024 x i32>>)
321
321
// CHECK: llvm.return
322
322
// CHECK: }
@@ -331,7 +331,7 @@ func.func @_QPopenmp_target_data_region() {
331
331
%c0 = arith.constant 0 : index
332
332
%c2 = arith.subi %c1024, %c3 : index
333
333
%bound = omp.bounds lower_bound(%c0 : index) upper_bound(%c2 : index) extent(%c1024 : index) stride(%c3 : index) start_idx(%c3 : index)
334
- %entry = omp.map_info var_ptr(%0 : !fir.ref<!fir.array<1024xi32>>) map_clauses(tofrom) capture(ByRef) bounds(%bound) -> !fir.ref<!fir.array<1024xi32>> {name = "a"}
334
+ %entry = omp.map_info var_ptr(%0 : !fir.ref<!fir.array<1024xi32>>, !fir.array<1024xi32> ) map_clauses(tofrom) capture(ByRef) bounds(%bound) -> !fir.ref<!fir.array<1024xi32>> {name = "a"}
335
335
omp.target_data map_entries(%entry : !fir.ref<!fir.array<1024xi32>>) {
336
336
%c1_i32 = arith.constant 1 : i32
337
337
%2 = fir.convert %c1_i32 : (i32) -> index
@@ -370,7 +370,7 @@ func.func @_QPopenmp_target_data_region() {
370
370
// CHECK: %[[VAL_ZERO:.*]] = llvm.mlir.constant(0 : index) : i64
371
371
// CHECK: %[[VAL_UPPER:.*]] = llvm.mlir.constant(1023 : index) : i64
372
372
// CHECK: %[[VAL_BOUNDS:.*]] = omp.bounds lower_bound(%[[VAL_ZERO]] : i64) upper_bound(%[[VAL_UPPER]] : i64) extent(%[[VAL_MAX]] : i64) stride(%[[VAL_ONE]] : i64) start_idx(%[[VAL_ONE]] : i64)
373
- // CHECK: %[[VAL_MAP:.*]] = omp.map_info var_ptr(%[[VAL_1]] : !llvm.ptr<array<1024 x i32>>) map_clauses(tofrom) capture(ByRef) bounds(%[[VAL_BOUNDS]]) -> !llvm.ptr<array<1024 x i32>> {name = "a"}
373
+ // CHECK: %[[VAL_MAP:.*]] = omp.map_info var_ptr(%[[VAL_1]] : !llvm.ptr<array<1024 x i32>>, !llvm.array<1024 x i32> ) map_clauses(tofrom) capture(ByRef) bounds(%[[VAL_BOUNDS]]) -> !llvm.ptr<array<1024 x i32>> {name = "a"}
374
374
// CHECK: omp.target_data map_entries(%[[VAL_MAP]] : !llvm.ptr<array<1024 x i32>>) {
375
375
// CHECK: %[[VAL_4:.*]] = llvm.mlir.constant(1 : i32) : i32
376
376
// CHECK: %[[VAL_5:.*]] = llvm.sext %[[VAL_4]] : i32 to i64
@@ -432,7 +432,7 @@ func.func @_QPomp_target() {
432
432
%c0 = arith.constant 0 : index
433
433
%1 = arith.subi %c512, %c1 : index
434
434
%2 = omp.bounds lower_bound(%c0 : index) upper_bound(%1 : index) extent(%c512 : index) stride(%c1 : index) start_idx(%c1 : index)
435
- %3 = omp.map_info var_ptr(%0 : !fir.ref<!fir.array<512xi32>>) map_clauses(tofrom) capture(ByRef) bounds(%2) -> !fir.ref<!fir.array<512xi32>> {name = "a"}
435
+ %3 = omp.map_info var_ptr(%0 : !fir.ref<!fir.array<512xi32>>, !fir.array<512xi32> ) map_clauses(tofrom) capture(ByRef) bounds(%2) -> !fir.ref<!fir.array<512xi32>> {name = "a"}
436
436
omp.target thread_limit(%c64_i32 : i32) map_entries(%3 : !fir.ref<!fir.array<512xi32>>) {
437
437
%c10_i32 = arith.constant 10 : i32
438
438
%c1_i64 = arith.constant 1 : i64
@@ -454,7 +454,7 @@ func.func @_QPomp_target() {
454
454
// CHECK: %[[LOWER:.*]] = llvm.mlir.constant(0 : index) : i64
455
455
// CHECK: %[[UPPER:.*]] = llvm.mlir.constant(511 : index) : i64
456
456
// CHECK: %[[BOUNDS:.*]] = omp.bounds lower_bound(%[[LOWER]] : i64) upper_bound(%[[UPPER]] : i64) extent(%[[EXTENT]] : i64) stride(%[[STRIDE]] : i64) start_idx(%[[STRIDE]] : i64)
457
- // CHECK: %[[MAP:.*]] = omp.map_info var_ptr(%2 : !llvm.ptr<array<512 x i32>>) map_clauses(tofrom) capture(ByRef) bounds(%[[BOUNDS]]) -> !llvm.ptr<array<512 x i32>> {name = "a"}
457
+ // CHECK: %[[MAP:.*]] = omp.map_info var_ptr(%2 : !llvm.ptr<array<512 x i32>>, !llvm.array<512 x i32> ) map_clauses(tofrom) capture(ByRef) bounds(%[[BOUNDS]]) -> !llvm.ptr<array<512 x i32>> {name = "a"}
458
458
// CHECK: omp.target thread_limit(%[[VAL_2]] : i32) map_entries(%[[MAP]] : !llvm.ptr<array<512 x i32>>) {
459
459
// CHECK: %[[VAL_3:.*]] = llvm.mlir.constant(10 : i32) : i32
460
460
// CHECK: %[[VAL_4:.*]] = llvm.mlir.constant(1 : i64) : i64
0 commit comments