[Mlir-commits] [mlir] [OpenMP][Flang] Add "IsolatedFromAbove" and "OutlineableOpenMPOpInterface" trait to omp.target (PR #67164)

Kiran Chandramohan llvmlistbot at llvm.org
Wed Sep 27 15:37:37 PDT 2023


kiranchandramohan wrote:

It looks like there are a few changes being made in the patch.
-> Introduction of default/implicit mapping. 
-> Introduction of block arguments for map entries. While this is introduced as required for `IsolatedFromAbove` it also captures the lifetime of the mapping which starts and ends with the region. If we resort to this (block arguments) as the default representation then it can be common for target and target data operations. And this change can be disconnected from the `IsolatedFromAbove` trait.
-> Addition of the `IsolatedFromAbove` trait.

You could modify the pretty-printing to capture the correspondence between block arguments and map_entries.
```
omp.target map_entries(block_arg1 <- map_entry1 : type1 , block_arg2 <- map_entry2 : type2) {
}
```
Or alternatively, directly assign the map_info to the block argument.
```
omp.target
^bb0(block_arg1 : type1, block_arg2 : type2):
   block_arg1 = omp.map_info
   block_arg2 = omp.map_info
```

Once this is complete, it might be good to update https://github.com/llvm/llvm-project/issues/63555.

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


More information about the Mlir-commits mailing list