let arguments = (ins Optional<I1>:$if_expr,
Optional<AnyInteger>:$device,
- Variadic<AnyType>:$use_device_ptr,
- Variadic<AnyType>:$use_device_addr,
+ Variadic<OpenMP_PointerLikeType>:$use_device_ptr,
+ Variadic<OpenMP_PointerLikeType>:$use_device_addr,
Variadic<OpenMP_PointerLikeType>:$map_operands,
I64ArrayAttr:$map_types);
let assemblyFormat = [{
oilist(`if` `(` $if_expr `:` type($if_expr) `)`
- | `device` `(` $device `:` type($device) `)`
- | `use_device_ptr` `(` $use_device_ptr `:` type($use_device_ptr) `)`
- | `use_device_addr` `(` $use_device_addr `:` type($use_device_addr) `)`)
+ | `device` `(` $device `:` type($device) `)`)
`map` `(` custom<MapClause>($map_operands, type($map_operands), $map_types) `)`
+ oilist(`use_device_ptr` `(` $use_device_ptr `:` type($use_device_ptr) `)`
+ | `use_device_addr` `(` $use_device_addr `:` type($use_device_addr) `)`)
$region attr-dict
}];
// CHECK: omp.target_data if(%[[VAL_0:.*]] : i1) device(%[[VAL_1:.*]] : si32) map((always, from -> %[[VAL_2:.*]] : memref<?xi32>))
omp.target_data if(%if_cond : i1) device(%device : si32) map((always, from -> %map1 : memref<?xi32>)){}
- // CHECK: omp.target_data use_device_ptr(%[[VAL_3:.*]] : memref<i32>) use_device_addr(%[[VAL_4:.*]] : memref<?xi32>) map((close, present, to -> %[[VAL_2:.*]] : memref<?xi32>))
- omp.target_data use_device_ptr(%device_ptr : memref<i32>) use_device_addr(%device_addr : memref<?xi32>) map((close, present, to -> %map1 : memref<?xi32>)){}
+ // CHECK: omp.target_data map((close, present, to -> %[[VAL_2:.*]] : memref<?xi32>)) use_device_ptr(%[[VAL_3:.*]] : memref<i32>) use_device_addr(%[[VAL_4:.*]] : memref<?xi32>)
+ omp.target_data map((close, present, to -> %map1 : memref<?xi32>)) use_device_ptr(%device_ptr : memref<i32>) use_device_addr(%device_addr : memref<?xi32>) {}
// CHECK: omp.target_data map((tofrom -> %[[VAL_2]] : memref<?xi32>), (alloc -> %[[VAL_5:.*]] : memref<?xi32>))
omp.target_data map((tofrom -> %map1 : memref<?xi32>), (alloc -> %map2 : memref<?xi32>)){}